@Test
public void testEquals() throws Exception {

    Process process1 = (Process) EntityType.PROCESS.getUnmarshaller().unmarshal(
            getClass().getResourceAsStream(PROCESS_XML));
    Process process2 = (Process) EntityType.PROCESS.getUnmarshaller().unmarshal(
            getClass().getResourceAsStream(PROCESS_XML));
    Assert.assertTrue(EntityUtil.equals(process1, process2));
    Assert.assertTrue(EntityUtil.md5(process1).equals(EntityUtil.md5(process2)));
    process2.getClusters().getClusters().get(0).getValidity().setEnd(SchemaHelper.parseDateUTC("2013-04-21T00:00Z"));
    Assert.assertFalse(EntityUtil.equals(process1, process2));
    Assert.assertFalse(EntityUtil.md5(process1).equals(EntityUtil.md5(process2)));
    Assert.assertTrue(EntityUtil.equals(process1, process2, new String[] {"clusters.clusters[\\d+].validity.end"}));
}