### Question:
CredHubCredentialsGenerator implements CredentialGenerator { @Override public Mono<String> generateString(String applicationId, String serviceInstanceId, String descriptor, int length, boolean includeUppercaseAlpha, boolean includeLowercaseAlpha, boolean includeNumeric, boolean includeSpecial) { return credHubOperations.credentials() .generate(PasswordParametersRequest.builder() .name(new SimpleCredentialName(applicationId, serviceInstanceId, descriptor)) .parameters(passwordParameters(length, includeUppercaseAlpha, includeLowercaseAlpha, includeNumeric, includeSpecial)) .build(), PasswordCredential.class) .map(CredentialDetails::getValue) .map(PasswordCredential::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 generateString() { given(this.credHubOperations.credentials()) .willReturn(credHubCredentialOperations); CredentialDetails<PasswordCredential> creds = new CredentialDetails<>("id", new SimpleCredentialName("app-service"), CredentialType.PASSWORD, new PasswordCredential("password")); given(this.credHubCredentialOperations.generate(any(), eq(PasswordCredential.class))) .willReturn(Mono.just(creds)); StepVerifier.create(generator.generateString("foo", "bar", "hello", 12, false, false, false, false)) .assertNext(password -> assertThat(password).isEqualTo("password")) .verifyComplete(); }