### Question:
DefaultContinuousAnimationPlan extends DefaultAnimationPlan implements ContinuousAnimationPlan { @Override public DefaultContinuousAnimationState getFinalState() { DefaultAnimationState finalState = super.getFinalState(); return createStateFromParentState(finalState, false); } DefaultContinuousAnimationPlan(List<? extends TimeSpan> sequence, Duration activeWindowDuration,
            Duration advanceDuration, EndBehavior endBehavior, TimeSpan limitWindow); @Override DefaultAnimationState determineNextState(AnimationState state); DefaultContinuousAnimationState determineNextState(DefaultContinuousAnimationState state); @Override DefaultAnimationState determinePreviousState(AnimationState state); DefaultContinuousAnimationState determinePreviousState(DefaultContinuousAnimationState state); @Override boolean equals(Object obj); @Override @Nullable @SuppressFBWarnings("RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE") DefaultContinuousAnimationState findState(Date time, Direction direction); @Override @SuppressFBWarnings("RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE") DefaultContinuousAnimationState findState(TimeSpan span, Direction direction); @Override Duration getActiveWindowDuration(); @Override Duration getAdvanceDuration(); @Override DefaultContinuousAnimationState getFinalState(); @Override AnimationState getFinalState(AnimationState state); AnimationState getFinalState(DefaultContinuousAnimationState state); @Override DefaultContinuousAnimationState getInitialState(); @Override TimeSpan getLimitWindow(); @Override TimeSpan getTimeSpanForState(AnimationState state); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void testGetFinalState() { DefaultContinuousAnimationPlan plan = createPlan(); Assert.assertEquals(new DefaultContinuousAnimationState(0, TimeSpan.get(3540000L, 3600000L), Direction.FORWARD), plan.getFinalState()); }
@Test public void testGetFinalStateAnimationState() { List<? extends TimeSpan> sequence = Arrays.asList(TimeSpan.get(0L, 1000L), TimeSpan.get(1000L, 2000L)); DefaultContinuousAnimationPlan plan = new DefaultContinuousAnimationPlan(sequence, new Milliseconds(500L), new Milliseconds(15L), EndBehavior.WRAP, null); DefaultContinuousAnimationState start; start = new DefaultContinuousAnimationState(0, TimeSpan.get(500L, 1000L), Direction.FORWARD); Assert.assertEquals(new DefaultContinuousAnimationState(1, TimeSpan.get(1495L, 1995L), Direction.FORWARD), plan.getFinalState(start)); start = new DefaultContinuousAnimationState(1, TimeSpan.get(1005L, 1505L), Direction.FORWARD); Assert.assertEquals(new DefaultContinuousAnimationState(1, TimeSpan.get(1500L, 2000L), Direction.FORWARD), plan.getFinalState(start)); start = new DefaultContinuousAnimationState(1, TimeSpan.get(1000L, 1500L), Direction.BACKWARD); Assert.assertEquals(new DefaultContinuousAnimationState(0, TimeSpan.get(5L, 505L), Direction.BACKWARD), plan.getFinalState(start)); start = new DefaultContinuousAnimationState(0, TimeSpan.get(490L, 990L), Direction.BACKWARD); Assert.assertEquals(new DefaultContinuousAnimationState(0, TimeSpan.get(10L, 510L), Direction.BACKWARD), plan.getFinalState(start)); }