@Test public void testLookupServiceB() { final Map<String,String> attributes = new HashMap<>(); attributes.put(DBCPConnectionPoolLookup.DATABASE_NAME_ATTRIBUTE, "b"); final Connection connection = dbcpLookupService.getConnection(attributes); assertNotNull(connection); assertTrue(connection instanceof MockConnection); final MockConnection mockConnection = (MockConnection)connection; assertEquals(connectionB.getName(), mockConnection.getName()); }
@Override public Connection getConnection() throws ProcessException { throw new UnsupportedOperationException("Cannot lookup DBCPConnectionPool without attributes"); }
DBCPConnectionPoolLookup extends AbstractControllerService implements DBCPService { @Override public Connection getConnection() throws ProcessException { throw new UnsupportedOperationException("Cannot lookup DBCPConnectionPool without attributes"); } }
DBCPConnectionPoolLookup extends AbstractControllerService implements DBCPService { @Override public Connection getConnection() throws ProcessException { throw new UnsupportedOperationException("Cannot lookup DBCPConnectionPool without attributes"); }  }
DBCPConnectionPoolLookup extends AbstractControllerService implements DBCPService { @Override public Connection getConnection() throws ProcessException { throw new UnsupportedOperationException("Cannot lookup DBCPConnectionPool without attributes"); }  @OnEnabled void onEnabled(final ConfigurationContext context); @OnDisabled void onDisabled(); @Override Connection getConnection(); @Override Connection getConnection(Map<String, String> attributes); }
DBCPConnectionPoolLookup extends AbstractControllerService implements DBCPService { @Override public Connection getConnection() throws ProcessException { throw new UnsupportedOperationException("Cannot lookup DBCPConnectionPool without attributes"); }  @OnEnabled void onEnabled(final ConfigurationContext context); @OnDisabled void onDisabled(); @Override Connection getConnection(); @Override Connection getConnection(Map<String, String> attributes); static final String DATABASE_NAME_ATTRIBUTE; }