Search in sources :

Example 1 with AuditActor

use of org.graylog2.audit.AuditActor in project graylog2-server by Graylog2.

the class AuditActorTest method testSystem.

@Test
public void testSystem() throws Exception {
    final NodeId nodeId = mock(NodeId.class);
    when(nodeId.toString()).thenReturn("28164cbe-4ad9-4c9c-a76e-088655aa78892");
    final AuditActor actor = AuditActor.system(nodeId);
    assertThat(actor.urn()).isEqualTo("urn:graylog:node:28164cbe-4ad9-4c9c-a76e-088655aa78892");
}
Also used : NodeId(org.graylog2.plugin.system.NodeId) Test(org.junit.Test)

Aggregations

NodeId (org.graylog2.plugin.system.NodeId)1 Test (org.junit.Test)1