use of org.cloudfoundry.credhub.audit.EventAuditRecordParameters in project credhub by cloudfoundry-incubator.
the class SetHandlerTest method handleSetRequest_withACertificateSetRequest_andNoCaName_usesCorrectParameters.
@Test
public void handleSetRequest_withACertificateSetRequest_andNoCaName_usesCorrectParameters() {
CertificateSetRequest setRequest = new CertificateSetRequest();
final CertificateCredentialValue certificateValue = new CertificateCredentialValue(null, "Picard", "Enterprise", null);
final ArrayList<EventAuditRecordParameters> eventAuditRecordParameters = new ArrayList<>();
setRequest.setType("certificate");
setRequest.setName("/captain");
setRequest.setAdditionalPermissions(accessControlEntries);
setRequest.setOverwrite(false);
setRequest.setCertificateValue(certificateValue);
subject.handle(setRequest, eventAuditRecordParameters);
verify(credentialService).save(null, certificateValue, setRequest, eventAuditRecordParameters);
verify(permissionService).savePermissions(credentialVersion, accessControlEntries, eventAuditRecordParameters, true, "/captain");
}
Aggregations