EmbeddedSensorObservationPeriod implements IEmbeddedSensorObservationPeriod { @Override public boolean isTimeCompleted(final long time) { return time > periodEnd; } EmbeddedSensorObservationPeriod(final long start, final long end, final long nItems, final IEmbeddedSensorStrategy<TState> strategy); @Override EmbeddedSensorObservationPeriod<TState> nextPeriod(final long inclTime); @Override boolean isTimeCompleted(final long time); @Override boolean recordProcessor(final IMessageProcessor mp, final long time); @Override IObject createMessage();  }
@Test public void Should_checkTimeCompleteness() throws Exception { IEmbeddedSensorObservationPeriod esop = new EmbeddedSensorObservationPeriod<>(100, 200, -1, strategyMock); assertFalse(esop.isTimeCompleted(200)); assertTrue(esop.isTimeCompleted(201)); }