@Test
public void generateCredential_shouldUseTheProvidedKeyLength() throws Exception {

  final RsaGenerationParameters rsaGenerationParameters = new RsaGenerationParameters();
  rsaGenerationParameters.setKeyLength(4096);
  subject.generateCredential(rsaGenerationParameters);
  verify(keyPairGenerator).generateKeyPair(4096);
}