MDPasswordEncoder implements IPasswordEncoder { @Override public void setIterations(final int iterations) { if (iterations <= 0) { throw new IllegalArgumentException("Iterations value should be greater than zero"); } this.iterations = iterations; } private  MDPasswordEncoder(
            final String algorithm,
            final IEncoder encoder,
            final ICharSequenceCodec charSequenceCodec
    ); static MDPasswordEncoder create(
            @Nonnull final String algorithm,
            @Nonnull final IEncoder encoder,
            @Nonnull final ICharSequenceCodec charSequenceCodec
    ); @Override String encode(@Nonnull final String password); @Override String encode(@Nonnull final String password, @Nonnull final String salt); @Override void setIterations(final int iterations);  }
@Test(expected = IllegalArgumentException.class) public void should_ThrowException_WithReason_InvalidIterations() throws EncodingException, DecodingException { resetVerifyMockObject(); final int iterations = -1; passwordEncoder.setIterations(iterations); }