MultiImageFileSource extends Source implements PreviousNext { @Override protected boolean updateOutputSockets() { if (outputSocket.getValue() .map(m -> m.getCpu()) .map(m -> !currentImage.get().equals(m)) .orElse(false)) { outputSocket.getValue().ifPresent(m -> currentImage.ifPresent(m::set)); outputSocket.flagChanged(); return true; } else { return false; } } @AssistedInject  MultiImageFileSource(
      final EventBus eventBus,
      final OutputSocket.Factory outputSocketFactory,
      final ExceptionWitness.Factory exceptionWitnessFactory,
      @Assisted final List<File> files,
      @Assisted final int index); @AssistedInject  MultiImageFileSource(
      final EventBus eventBus,
      final OutputSocket.Factory outputSocketFactory,
      final ExceptionWitness.Factory exceptionWitnessFactory,
      @Assisted final List<File> files); @AssistedInject  MultiImageFileSource(final EventBus eventBus,
                       final OutputSocket.Factory outputSocketFactory,
                       final ExceptionWitness.Factory exceptionWitnessFactory,
                       @Assisted final Properties properties); private  MultiImageFileSource(
      final EventBus eventBus,
      final OutputSocket.Factory outputSocketFactory,
      final ExceptionWitness.Factory exceptionWitnessFactory,
      final String[] paths,
      final int index); @Override void initialize(); @Override String getName(); @Override Properties getProperties(); @Override void next(); @Override void previous();  }
@Test @SuppressWarnings("PMD.JUnitTestsShouldIncludeAssert") public void testConstructedWithIndex() { sourceWithIndexSet.updateOutputSockets(); OutputSocket<MatWrapper> outputSocket = sourceWithIndexSet.getOutputSockets().get(0); gompeiJpegFile.assertSameImage(outputSocket.getValue().get()); }