TransformInvocationBuilder { TransformInvocation build() { if (outputProvider == null) { throw new IllegalArgumentException("Output provider needs to be specified."); } return new CustomTransformInvocation(inputs, referencedInputs, outputProvider); } TransformInvocationBuilder();   }
@Test(expected = IllegalArgumentException.class) public void whenOutputProviderNotSet_shouldThrowException() throws Exception { builder.build(); }