DatabasePortalMetaServerProvider implements PortalMetaServerProvider { @Override public boolean exists(Env targetEnv) { return addresses.containsKey(targetEnv); } DatabasePortalMetaServerProvider(final PortalConfig portalConfig); @Override String getMetaServerAddress(Env targetEnv); @Override boolean exists(Env targetEnv); @Override void reload();  }
@Test public void testExists() { assertTrue(databasePortalMetaServerProvider.exists(Env.DEV)); assertFalse(databasePortalMetaServerProvider.exists(Env.PRO)); assertTrue(databasePortalMetaServerProvider.exists(Env.addEnvironment("nothing"))); }