DestinationPool extends ListenableDestination { @Override public boolean isStarted() { return destinations.stream().allMatch(Destination::isStarted); } DestinationPool(
      @NonNull final KeyProvider<Mutation<?>, String> keyProvider,
      @NonNull final List<Destination> destinations); int getPoolSize(); @Override synchronized Mutation<?> getLastPublishedMutation(); @Override synchronized void send(@NonNull final List<? extends Mutation<?>> mutations); @Override boolean isStarted(); @Override void open(); @Override void close(); @Override void clear();  }
@Test public void testIsOpen() throws Exception { when(firstDestination.isStarted()).thenReturn(true); when(secondDestination.isStarted()).thenReturn(true); when(thirdDestination.isStarted()).thenReturn(true); when(fourthDestination.isStarted()).thenReturn(false); assertFalse(destinationPool.isStarted()); when(fourthDestination.isStarted()).thenReturn(true); assertTrue(destinationPool.isStarted()); }