### Question:
UpdateHelper { public static boolean isClusterEntityUpdated(final org.apache.falcon.entity.v0.cluster.Cluster oldEntity, final org.apache.falcon.entity.v0.cluster.Cluster newEntity) { if (!oldEntity.getColo().equals(newEntity.getColo())) { return true; } for(Interfacetype interfacetype : Interfacetype.values()) { if (!ClusterHelper.matchInterface(oldEntity, newEntity, interfacetype)) { return true; } } for(ClusterLocationType locationType : ClusterLocationType.values()) { if (!ClusterHelper.matchLocations(oldEntity, newEntity, locationType)) { return true; } } if (!ClusterHelper.matchProperties(oldEntity, newEntity)) { return true; } return false; } private  UpdateHelper(); static boolean isEntityUpdated(Entity oldEntity, Entity newEntity, String cluster,
        Path oldStagingPath); static boolean shouldUpdate(Entity oldEntity, Entity newEntity, Entity affectedEntity, String cluster); static boolean isClusterEntityUpdated(final org.apache.falcon.entity.v0.cluster.Cluster oldEntity,
                                                        final org.apache.falcon.entity.v0.cluster.Cluster newEntity); static boolean isDatasourceEntityUpdated(final Datasource oldEntity, final Datasource newEntity);  }### Answer:
@Test public void testIsClusterEntityUpdated() throws Exception { Unmarshaller unmarshaller = EntityType.CLUSTER.getUnmarshaller(); String cluster = "testCluster"; Cluster clusterEntity = ConfigurationStore.get().get(EntityType.CLUSTER, cluster); Cluster newClusterEntity = (Cluster) unmarshaller.unmarshal(this.getClass().getResource(CLUSTER_XML)); newClusterEntity.setName(cluster); Assert.assertNotNull(newClusterEntity); ACL acl = new ACL(); acl.setOwner("Test"); acl.setGroup("testGroup"); acl.setPermission("*"); newClusterEntity.setACL(acl); newClusterEntity.setDescription("New Description"); newClusterEntity.setTags("test=val,test2=val2"); Assert.assertFalse(UpdateHelper.isClusterEntityUpdated(clusterEntity, newClusterEntity)); newClusterEntity.setColo("NewColoValue"); Assert.assertTrue(UpdateHelper.isClusterEntityUpdated(clusterEntity, newClusterEntity)); Interface writeInterface = ClusterHelper.getInterface(newClusterEntity, Interfacetype.WRITE); newClusterEntity.getInterfaces().getInterfaces().remove(writeInterface); Assert.assertNotNull(writeInterface); writeInterface.setEndpoint("hdfs: writeInterface.setType(Interfacetype.WRITE); writeInterface.setVersion("2.2.0"); newClusterEntity.getInterfaces().getInterfaces().add(writeInterface); Assert.assertTrue(UpdateHelper.isClusterEntityUpdated(clusterEntity, newClusterEntity)); newClusterEntity = (Cluster) unmarshaller.unmarshal(this.getClass().getResource(CLUSTER_XML)); newClusterEntity.setName(cluster); Assert.assertNotNull(newClusterEntity); org.apache.falcon.entity.v0.cluster.Property property = new org.apache.falcon.entity.v0.cluster.Property(); property.setName("testName"); property.setValue("testValue"); newClusterEntity.getProperties().getProperties().add(property); Assert.assertTrue(UpdateHelper.isClusterEntityUpdated(clusterEntity, newClusterEntity)); newClusterEntity = (Cluster) unmarshaller.unmarshal(this.getClass().getResource(CLUSTER_XML)); newClusterEntity.setName(cluster); Assert.assertNotNull(newClusterEntity); org.apache.falcon.entity.v0.cluster.Location stagingLocation = ClusterHelper.getLocation(newClusterEntity, ClusterLocationType.STAGING); Assert.assertNotNull(stagingLocation); newClusterEntity.getInterfaces().getInterfaces().remove(stagingLocation); stagingLocation.setPath("/test/path/here"); newClusterEntity.getLocations().getLocations().add(stagingLocation); Assert.assertTrue(UpdateHelper.isClusterEntityUpdated(clusterEntity, newClusterEntity)); }