### Question:
UpdateHelper { public static boolean isDatasourceEntityUpdated(final Datasource oldEntity, final Datasource newEntity) throws FalconException { if (!DatasourceHelper.isSameDriverClazz(oldEntity.getDriver(), newEntity.getDriver())) { return true; } for(org.apache.falcon.entity.v0.datasource.Interfacetype ifacetype : org.apache.falcon.entity.v0.datasource.Interfacetype.values()) { if (!DatasourceHelper.isSameInterface(oldEntity, newEntity, ifacetype)) { return true; } } if (!DatasourceHelper.isSameCredentials(oldEntity.getInterfaces().getCredential(), newEntity.getInterfaces().getCredential())) { return true; } if (!DatasourceHelper.isSameProperties(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 testIsDatasourceEntityUpdated() throws Exception { Unmarshaller unmarshaller = EntityType.DATASOURCE.getUnmarshaller(); String datasource = "datasource1"; Datasource datasourceEntity = ConfigurationStore.get().get(EntityType.DATASOURCE, datasource); Datasource newDatasourceEntity = getNewDatasource(unmarshaller, datasource); Assert.assertNotNull(newDatasourceEntity); org.apache.falcon.entity.v0.datasource.ACL acl = new org.apache.falcon.entity.v0.datasource.ACL(); acl.setOwner("Test"); acl.setGroup("testGroup"); acl.setPermission("*"); newDatasourceEntity.setACL(acl); newDatasourceEntity.setDescription("New Description"); newDatasourceEntity.setTags("test=val,test2=val2"); newDatasourceEntity.setColo("newColo2"); Assert.assertFalse(UpdateHelper.isDatasourceEntityUpdated(datasourceEntity, newDatasourceEntity)); newDatasourceEntity.getInterfaces().getInterfaces().get(0).setEndpoint("jdbc:hsqldb:localhost2/db1"); Assert.assertTrue(UpdateHelper.isDatasourceEntityUpdated(datasourceEntity, newDatasourceEntity)); newDatasourceEntity = getNewDatasource(unmarshaller, datasource); Credential cred = newDatasourceEntity.getInterfaces().getInterfaces().get(0).getCredential(); cred.setPasswordText("blah"); Assert.assertTrue(UpdateHelper.isDatasourceEntityUpdated(datasourceEntity, newDatasourceEntity)); }