ClusterHelper.getInterface(cluster, Interfacetype.WRITE).setEndpoint(conf.get("fs.default.name"));
Assert.assertNotNull(cluster);
Assert.assertEquals(cluster.getName(), "testCluster");
Interface execute = ClusterHelper.getInterface(cluster, Interfacetype.EXECUTE);
Assert.assertEquals(execute.getEndpoint(), "localhost:8021");
Assert.assertEquals(execute.getVersion(), "0.20.2");
Interface readonly = ClusterHelper.getInterface(cluster, Interfacetype.READONLY);
Assert.assertEquals(readonly.getEndpoint(), "hftp://localhost:50010");
Assert.assertEquals(readonly.getVersion(), "0.20.2");
Interface write = ClusterHelper.getInterface(cluster, Interfacetype.WRITE);
//assertEquals(write.getEndpoint(), conf.get("fs.default.name"));
Assert.assertEquals(write.getVersion(), "0.20.2");
Interface workflow = ClusterHelper.getInterface(cluster, Interfacetype.WORKFLOW);
Assert.assertEquals(workflow.getEndpoint(), "http://localhost:11000/oozie/");
Assert.assertEquals(workflow.getVersion(), "3.1");
Assert.assertEquals(ClusterHelper.getLocation(cluster, "staging"), "/projects/falcon/staging");
StringWriter stringWriter = new StringWriter();
Marshaller marshaller = EntityType.CLUSTER.getMarshaller();
marshaller.marshal(cluster, stringWriter);
System.out.println(stringWriter.toString());
Interface catalog = ClusterHelper.getInterface(cluster, Interfacetype.REGISTRY);
Assert.assertEquals(catalog.getEndpoint(), "http://localhost:48080/templeton/v1");
Assert.assertEquals(catalog.getVersion(), "0.11.0");
Assert.assertEquals(ClusterHelper.getLocation(cluster, "staging"), "/projects/falcon/staging");
}