EntityUtil { public static boolean equals(Entity lhs, Entity rhs) throws IvoryException { return equals(lhs, rhs, null); }  static T getEntity(EntityType type, String entityName); static T getEntity(String type, String entityName); static TimeZone getTimeZone(String tzId); static Date getEndTime(Entity entity, String cluster); static Date parseDateUTC(String dateStr); static Date getStartTime(Entity entity, String cluster); static Date getEndTime(Process process, String cluster); static Date getStartTime(Process process, String cluster); static Date getEndTime(Feed feed, String cluster); static Date getStartTime(Feed feed, String cluster); static int getParallel(Entity entity); static void setStartDate(Entity entity, String cluster, Date startDate); static void setEndTime(Entity entity, String cluster, Date endDate); static void setParallel(Entity entity, int parallel); static int getParallel(Process process); static void setStartDate(Process process, String cluster, Date startDate); static void setParallel(Process process, int parallel); static void setEndTime(Process process, String cluster, Date endDate); static int getParallel(Feed feed); static void setStartDate(Feed feed, String cluster, Date startDate); static void setEndTime(Feed feed, String cluster, Date endDate); static void setParallel(Feed feed, int parallel); static Frequency getFrequency(Entity entity); static Frequency getFrequency(Process process); static Frequency getFrequency(Feed feed); static TimeZone getTimeZone(Entity entity); static TimeZone getTimeZone(Process process); static TimeZone getTimeZone(Feed feed); static Date getNextStartTime(Date startTime, Frequency frequency, TimeZone timezone, Date now); static int getInstanceSequence(Date startTime, Frequency frequency, TimeZone tz, Date instanceTime); static String md5(Entity entity); static boolean equals(Entity lhs, Entity rhs); static boolean equals(Entity lhs, Entity rhs, String[] filterProps); static String stringOf(Entity entity); static String getStagingPath(Entity entity); static WorkflowName getWorkflowName(Tag tag, List<String> suffixes,
			Entity entity); static WorkflowName getWorkflowName(Tag tag, Entity entity); static WorkflowName getWorkflowName(Entity entity); static String getWorkflowNameSuffix(String workflowName,
			Entity entity); static Tag getWorkflowNameTag(String workflowName, Entity entity); static T getClusterView(T entity, String clusterName); static Set<String> getClustersDefined(Entity entity); static Set<String> getClustersDefinedInColos(Entity entity); static Path getStagingPath(
			org.apache.ivory.entity.v0.cluster.Cluster cluster, Entity entity); static Retry getRetry(Entity entity); static LateProcess getLateProcess(Entity entity); static Path getLogPath(
			org.apache.ivory.entity.v0.cluster.Cluster cluster, Entity entity); static String UTCtoURIDate(String utc);  }
@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"})); }