@Test public void testModify() throws Exception { final TimeTicksModifier timeTicksModifier = new TimeTicksModifier(); final TimeTicks timeTicks = new TimeTicks(); final long initialTimeTicks = timeTicks.getValue(); Thread.sleep(11L); final TimeTicks modifiedVariable = timeTicksModifier.modify(timeTicks); final long newTimeTicks = modifiedVariable.getValue(); assertNotEquals(newTimeTicks, initialTimeTicks); }
@Override public TimeTicks modify(final TimeTicks variable) { TimeTicks timeTicks = new TimeTicks(); final long timeTicksInMilliseconds = variable.toMilliseconds(); final long upTime = (System.currentTimeMillis() - initTime) + timeTicksInMilliseconds; timeTicks.fromMilliseconds(timeTicksInMilliseconds + upTime); return timeTicks; }
TimeTicksModifier implements VariableModifier<TimeTicks> { @Override public TimeTicks modify(final TimeTicks variable) { TimeTicks timeTicks = new TimeTicks(); final long timeTicksInMilliseconds = variable.toMilliseconds(); final long upTime = (System.currentTimeMillis() - initTime) + timeTicksInMilliseconds; timeTicks.fromMilliseconds(timeTicksInMilliseconds + upTime); return timeTicks; } }
TimeTicksModifier implements VariableModifier<TimeTicks> { @Override public TimeTicks modify(final TimeTicks variable) { TimeTicks timeTicks = new TimeTicks(); final long timeTicksInMilliseconds = variable.toMilliseconds(); final long upTime = (System.currentTimeMillis() - initTime) + timeTicksInMilliseconds; timeTicks.fromMilliseconds(timeTicksInMilliseconds + upTime); return timeTicks; }  }
TimeTicksModifier implements VariableModifier<TimeTicks> { @Override public TimeTicks modify(final TimeTicks variable) { TimeTicks timeTicks = new TimeTicks(); final long timeTicksInMilliseconds = variable.toMilliseconds(); final long upTime = (System.currentTimeMillis() - initTime) + timeTicksInMilliseconds; timeTicks.fromMilliseconds(timeTicksInMilliseconds + upTime); return timeTicks; }  @Override TimeTicks modify(final TimeTicks variable); }
TimeTicksModifier implements VariableModifier<TimeTicks> { @Override public TimeTicks modify(final TimeTicks variable) { TimeTicks timeTicks = new TimeTicks(); final long timeTicksInMilliseconds = variable.toMilliseconds(); final long upTime = (System.currentTimeMillis() - initTime) + timeTicksInMilliseconds; timeTicks.fromMilliseconds(timeTicksInMilliseconds + upTime); return timeTicks; }  @Override TimeTicks modify(final TimeTicks variable);  }