@Test public void testIsRunning() { when(handle1.isRunning()).thenReturn(false); when(handle2.isRunning()).thenReturn(false); assertFalse(tested.isRunning()); when(handle1.isRunning()).thenReturn(true); when(handle2.isRunning()).thenReturn(false); assertTrue(tested.isRunning()); when(handle1.isRunning()).thenReturn(false); when(handle2.isRunning()).thenReturn(true); assertTrue(tested.isRunning()); when(handle1.isRunning()).thenReturn(true); when(handle2.isRunning()).thenReturn(true); assertTrue(tested.isRunning()); }
@Override public boolean isRunning() { return handles.stream() .filter(IAnimationHandle::isRunning) .findAny() .isPresent(); }
MultipleAnimationHandle implements IAnimationHandle { @Override public boolean isRunning() { return handles.stream() .filter(IAnimationHandle::isRunning) .findAny() .isPresent(); } }
MultipleAnimationHandle implements IAnimationHandle { @Override public boolean isRunning() { return handles.stream() .filter(IAnimationHandle::isRunning) .findAny() .isPresent(); } MultipleAnimationHandle(final List<IAnimationHandle> handles); }
MultipleAnimationHandle implements IAnimationHandle { @Override public boolean isRunning() { return handles.stream() .filter(IAnimationHandle::isRunning) .findAny() .isPresent(); } MultipleAnimationHandle(final List<IAnimationHandle> handles); @Override IAnimationHandle run(); @Override IAnimationHandle stop(); @Override Node<?> getNode(); @Override boolean isRunning(); }
MultipleAnimationHandle implements IAnimationHandle { @Override public boolean isRunning() { return handles.stream() .filter(IAnimationHandle::isRunning) .findAny() .isPresent(); } MultipleAnimationHandle(final List<IAnimationHandle> handles); @Override IAnimationHandle run(); @Override IAnimationHandle stop(); @Override Node<?> getNode(); @Override boolean isRunning();  }