@Test @SuppressWarnings("unchecked") void testUpdateStream() { decorator.update(Stream.of(mockParameters(), mockParameters())); verify(delegateRepo).update(streamCaptor.capture()); streamCaptor .getValue() .forEach( t -> { }); verify(jsonValidator, times(2)).validate(JSON, SCHEMA); }
@Override public void update(DecoratorParameters decoratorParameters) { validateParameters(decoratorParameters); delegate().update(decoratorParameters); }
DecoratorParametersRepositoryDecorator extends AbstractRepositoryDecorator<DecoratorParameters> { @Override public void update(DecoratorParameters decoratorParameters) { validateParameters(decoratorParameters); delegate().update(decoratorParameters); } }
DecoratorParametersRepositoryDecorator extends AbstractRepositoryDecorator<DecoratorParameters> { @Override public void update(DecoratorParameters decoratorParameters) { validateParameters(decoratorParameters); delegate().update(decoratorParameters); } DecoratorParametersRepositoryDecorator(
      Repository<DecoratorParameters> delegateRepository, JsonValidator jsonValidator); }
DecoratorParametersRepositoryDecorator extends AbstractRepositoryDecorator<DecoratorParameters> { @Override public void update(DecoratorParameters decoratorParameters) { validateParameters(decoratorParameters); delegate().update(decoratorParameters); } DecoratorParametersRepositoryDecorator(
      Repository<DecoratorParameters> delegateRepository, JsonValidator jsonValidator); @Override void update(DecoratorParameters decoratorParameters); @Override void update(Stream<DecoratorParameters> decoratorParameters); @Override void add(DecoratorParameters decoratorParameters); @Override Integer add(Stream<DecoratorParameters> decoratorParameters); }
DecoratorParametersRepositoryDecorator extends AbstractRepositoryDecorator<DecoratorParameters> { @Override public void update(DecoratorParameters decoratorParameters) { validateParameters(decoratorParameters); delegate().update(decoratorParameters); } DecoratorParametersRepositoryDecorator(
      Repository<DecoratorParameters> delegateRepository, JsonValidator jsonValidator); @Override void update(DecoratorParameters decoratorParameters); @Override void update(Stream<DecoratorParameters> decoratorParameters); @Override void add(DecoratorParameters decoratorParameters); @Override Integer add(Stream<DecoratorParameters> decoratorParameters);  }