@Test
public void testAddErrorMessage() throws Exception {

    when(node.getName()).thenReturn("nodeName");
    when(node.getId()).thenReturn(Long.MAX_VALUE);
    validator.addErrorMessage(process,
                              node,
                              errors,
                              "any message");
    assertEquals(1,
                 errors.size());
    assertEquals("Node 'nodeName' [" + Long.MAX_VALUE + "] any message",
                 errors.get(0).getMessage());
}