package beaform.utilities;

import static org.junit.Assert.assertTrue;

import org.junit.Test;

public class SystemTimeTest {

	@Test
	public void testDefaultTimeSource() {
		final long start = System.currentTimeMillis();
		final long tested = SystemTime.getAsLong();
		final long end = System.currentTimeMillis();

		assertBetween("The tested value is not between the given arguments", start, end, tested);
	}

	private void assertBetween(String message, long boundary1, long boundary2, long tested) {
		long upper, lower;

		if (boundary1 <= boundary2) {
			lower = boundary1;
			upper = boundary2;
		}
		else {
			lower = boundary2;
			upper = boundary1;
		}

		assertTrue(message, (lower <= tested) && (tested <= upper));
	}

}

@@ -317,23 +317,20 @@
 %09%09assert
-Between
+True
 (%22The te
@@ -377,16 +377,26 @@
 ments%22, 
+isBetween(
 start, e
@@ -406,16 +406,17 @@
  tested)
+)
 ;%0A%09%7D%0A%0A%09p
@@ -426,43 +426,26 @@
 ate 
-void assertBetween(String message, 
+boolean isBetween(
 long
@@ -653,27 +653,14 @@
 %0A%0A%09%09
-assertTrue(message,
+return
  (lo
@@ -694,17 +694,16 @@
 = upper)
-)
 ;%0A%09%7D%0A%0A%7D%0A

Move the actual assertion to the test