use of org.cloudfoundry.credhub.request.UserSetRequest in project credhub by cloudfoundry-incubator.
the class SetHandlerTest method handleSetRequest_whenNonPasswordSetRequest_passesCorrectParametersWithNullGeneration.
@Test
public void handleSetRequest_whenNonPasswordSetRequest_passesCorrectParametersWithNullGeneration() {
UserSetRequest setRequest = new UserSetRequest();
final UserCredentialValue userCredentialValue = new UserCredentialValue("Picard", "Enterprise", "salt");
final ArrayList<EventAuditRecordParameters> eventAuditRecordParameters = new ArrayList<>();
setRequest.setType("user");
setRequest.setName("/captain");
setRequest.setAdditionalPermissions(accessControlEntries);
setRequest.setOverwrite(false);
setRequest.setUserValue(userCredentialValue);
subject.handle(setRequest, eventAuditRecordParameters);
verify(credentialService).save(null, userCredentialValue, setRequest, eventAuditRecordParameters);
verify(permissionService).savePermissions(credentialVersion, accessControlEntries, eventAuditRecordParameters, true, "/captain");
}
Aggregations