NavigatorPlugin { public ResultSet write(Entity entity) { return write(ImmutableList.of(entity)); } NavigatorPlugin(ClientConfig config,
                         MetadataWriterFactory factory);  NavigatorPlugin(ClientConfig config); static NavigatorPlugin fromConfigFile(String configFilePath); static NavigatorPlugin fromConfigMap(Map<String, Object> configMap); @SuppressWarnings("unchecked") MetadataModel registerModels(String packageName); MetadataModel registerModel(Class<? extends Entity> entityClass); MetadataModel registerModels(
      Collection<? extends Class<? extends Entity>> classes); ResultSet write(Entity entity); ResultSet write(Collection<Entity> entities); NavApiCient getClient(); ClientConfig getConfig(); String getNamespace();  }
@Test public void testWrite() { HdfsEntity entity = new HdfsEntity(); entity.setIdentity("foo"); plugin.write(entity); verify(mockWriter).write(captor.capture()); assertEquals(Iterables.getOnlyElement(captor.getValue()), entity); verify(mockWriter).flush(); verify(mockWriter).close(); }