@Test
public void testInternalByDate() throws ServiceRegistryException, InterruptedException {

  Date start = new Date();
  Thread.sleep(1);
  Date before = new Date();
  Thread.sleep(1);
  String[] mp = createAndAddMediaPackagesSimple(2, 2, 2, Opt.<String>none());
  Thread.sleep(1);
  Date after = new Date();
  //Non terminal query, but internal test so we create terminal expectations
  createIdAndVersionExpectation(mp[0], 0, 2);
  createIdAndVersionExpectation(mp[1], 0, 2);
  EasyMock.replay(sr);
  Assert.assertEquals("No versions exist between the start and before test values",
          "0", tsamjp.internalMoveByDate(start, before, REMOTE_STORE_1_ID));
  Assert.assertEquals("All four versions should move",
          "4", tsamjp.internalMoveByDate(before, after, REMOTE_STORE_1_ID));
  Assert.assertEquals("No versions exist after the end date",
          "0", tsamjp.internalMoveByDate(after, new Date(), REMOTE_STORE_1_ID));
  EasyMock.verify(sr);
}