|
|
|
|
@ -56,18 +56,18 @@ public class AuditEventTests {
@@ -56,18 +56,18 @@ public class AuditEventTests {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
public void nullTimestamp() throws Exception { |
|
|
|
|
this.thrown.expect(IllegalArgumentException.class); |
|
|
|
|
this.thrown.expectMessage("Timestamp must not be null"); |
|
|
|
|
new AuditEvent(null, "phil", "UNKNOWN", |
|
|
|
|
public void nullPrincipalIsMappedToEmptyString() { |
|
|
|
|
AuditEvent auditEvent = new AuditEvent(null, "UNKNOWN", |
|
|
|
|
Collections.singletonMap("a", (Object) "b")); |
|
|
|
|
assertThat(auditEvent.getPrincipal()).isEmpty(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
public void nullPrincipal() throws Exception { |
|
|
|
|
public void nullTimestamp() throws Exception { |
|
|
|
|
this.thrown.expect(IllegalArgumentException.class); |
|
|
|
|
this.thrown.expectMessage("Principal must not be null"); |
|
|
|
|
new AuditEvent(null, "UNKNOWN", Collections.singletonMap("a", (Object) "b")); |
|
|
|
|
this.thrown.expectMessage("Timestamp must not be null"); |
|
|
|
|
new AuditEvent(null, "phil", "UNKNOWN", |
|
|
|
|
Collections.singletonMap("a", (Object) "b")); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
|