@Test
public void noTimestampMustDefaultToCurrentTimestamp() {

    Context context = mock(Context.class);
    TrialFactor factor = mock(TrialFactor.class);
    when(factor.readTimestamp(any(Context.class)))
            .thenReturn(TrialFactor.NOT_AVAILABLE_TIMESTAMP);
    long minTimestamp = new Date().getTime();
    SimpleTrial trial = new SimpleTrial(context, new SimpleTrial.Config().factors(factor));
    long maxTimestamp = new Date().getTime();
    verify(factor).persistTimestamp(longThat(between(minTimestamp, maxTimestamp)), eq(context));
    assertFalse(trial.isTrialPeriodFinished());
}