Search in sources :

Example 1 with ForwardsInvocations

use of org.mockito.internal.stubbing.defaultanswers.ForwardsInvocations in project nifi by apache.

the class TlsToolkitStandaloneCommandLineTest method setup.

@Before
public void setup() {
    secureRandom = mock(SecureRandom.class);
    doAnswer(new ForwardsInvocations(new Random())).when(secureRandom).nextBytes(any(byte[].class));
    tlsToolkitStandaloneCommandLine = new TlsToolkitStandaloneCommandLine(new PasswordUtil(secureRandom));
}
Also used : Random(java.util.Random) SecureRandom(java.security.SecureRandom) PasswordUtil(org.apache.nifi.toolkit.tls.util.PasswordUtil) ForwardsInvocations(org.mockito.internal.stubbing.defaultanswers.ForwardsInvocations) SecureRandom(java.security.SecureRandom) Before(org.junit.Before)

Aggregations

SecureRandom (java.security.SecureRandom)1 Random (java.util.Random)1 PasswordUtil (org.apache.nifi.toolkit.tls.util.PasswordUtil)1 Before (org.junit.Before)1 ForwardsInvocations (org.mockito.internal.stubbing.defaultanswers.ForwardsInvocations)1