### Question:
CredHubCredentialsGenerator implements CredentialGenerator { @Override public Mono<Tuple2<String, String>> generateUser(String applicationId, String serviceInstanceId, String descriptor, int length, boolean includeUppercaseAlpha, boolean includeLowercaseAlpha, boolean includeNumeric, boolean includeSpecial) { return credHubOperations.credentials().generate(UserParametersRequest.builder() .name(new SimpleCredentialName(applicationId, serviceInstanceId, descriptor)) .parameters(passwordParameters(length, includeUppercaseAlpha, includeLowercaseAlpha, includeNumeric, includeSpecial)) .build(), UserCredential.class) .map(CredentialDetails::getValue) .map(userCredential -> Tuples.of(userCredential.getUsername(), userCredential.getPassword())); } CredHubCredentialsGenerator(ReactiveCredHubOperations credHubOperations); @Override Mono<Tuple2<String, String>> generateUser(String applicationId, String serviceInstanceId, String descriptor,
		int length, boolean includeUppercaseAlpha, boolean includeLowercaseAlpha, boolean includeNumeric,
		boolean includeSpecial); @Override Mono<String> generateString(String applicationId, String serviceInstanceId, String descriptor, int length,
		boolean includeUppercaseAlpha, boolean includeLowercaseAlpha, boolean includeNumeric,
		boolean includeSpecial); @Override Mono<Void> deleteUser(String applicationId, String serviceInstanceId, String descriptor); @Override Mono<Void> deleteString(String applicationId, String serviceInstanceId, String descriptor);  }### Answer:
@Test void generateUser() { given(this.credHubOperations.credentials()) .willReturn(credHubCredentialOperations); CredentialDetails<UserCredential> creds = new CredentialDetails<>("id", new SimpleCredentialName("app-service"), CredentialType.PASSWORD, new UserCredential("username", "password")); given(this.credHubCredentialOperations.generate(any(), eq(UserCredential.class))) .willReturn(Mono.just(creds)); StepVerifier.create(generator.generateUser("foo", "bar", "hello", 12, false, false, false, false)) .assertNext(tuple2 -> { assertThat(tuple2.getT1()).isEqualTo("username"); assertThat(tuple2.getT2()).isEqualTo("password"); }) .verifyComplete(); }