/** * Creates new {@link TimerData} object for aggregation purposes. * * @param timerData * {@link TimerData} to clone. * @param alteredTimestamp * New altered time stamp clone to have. * @return Cloned object ready for aggregation. */ private IAggregatedData<E> clone(E timerData, long alteredTimestamp) { IAggregatedData<E> clone = dataAggregator.getClone(timerData); clone.getData().setId(timerData.getId()); clone.getData().setTimeStamp(new Timestamp(alteredTimestamp)); return clone; }
timerData1.setTimeStamp(new Timestamp(new Date().getTime())); when(aggregator.getClone(Matchers.<TimerData> anyObject())).thenReturn(new AggregatedTimerData()); timerData1.setTimeStamp(newTimestamp);
verify(timerData, times(0)).setPlatformIdent(anyLong()); verify(timerData, times(0)).setSensorTypeIdent(anyLong()); verify(timerData, times(0)).setTimeStamp((Timestamp) anyObject()); verify(timerData, times(0)).setVariance(anyDouble());
timerData.setTimeStamp(new Timestamp(timestampValue)); timerData.setPlatformIdent(platformIdent); timerData.setCount(count); timerData2.setTimeStamp(new Timestamp(timestampValue * 2)); timerData2.setPlatformIdent(platformIdent); timerData2.setCount(count);
secondChildSequence.setDuration(SECOND_DURATION); secondChildSequence.setId(THIRD_ID); timerData.setTimeStamp(new Timestamp(TIMESTAMP_VALUE)); timerData.setPlatformIdent(PLATFORM_IDENT); timerData.setCount(COUNT);