HttpConnectorProvider implements Provider<Connector> { @Override public Connector get() { SelectChannelConnector ret = new SelectChannelConnector(); ret.setName("Myriad"); ret.setHost("0.0.0.0"); ret.setPort(myriadConf.getRestApiPort()); return ret; } @Inject  HttpConnectorProvider(MyriadConfiguration myriadConf); @Override Connector get();  }
@Test public void testConnector() throws Exception { HttpConnectorProvider provider = new HttpConnectorProvider(cfg); Connector connector = provider.get(); assertEquals(8192, connector.getPort()); assertEquals("0.0.0.0", connector.getHost()); assertEquals("Myriad", connector.getName()); }