@Test public void testWithSystemProperty() throws Exception { String someMetaAddress = "someMetaAddress"; Env someEnv = Env.DEV; System.setProperty(ConfigConsts.APOLLO_META_KEY, " " + someMetaAddress + " "); DefaultMetaServerProvider defaultMetaServerProvider = new DefaultMetaServerProvider(); assertEquals(someMetaAddress, defaultMetaServerProvider.getMetaServerAddress(someEnv)); }
@Override public String getMetaServerAddress(Env targetEnv) { return metaServerAddress; }
DefaultMetaServerProvider implements MetaServerProvider { @Override public String getMetaServerAddress(Env targetEnv) { return metaServerAddress; } }
DefaultMetaServerProvider implements MetaServerProvider { @Override public String getMetaServerAddress(Env targetEnv) { return metaServerAddress; } DefaultMetaServerProvider(); }
DefaultMetaServerProvider implements MetaServerProvider { @Override public String getMetaServerAddress(Env targetEnv) { return metaServerAddress; } DefaultMetaServerProvider(); @Override String getMetaServerAddress(Env targetEnv); @Override int getOrder(); }
DefaultMetaServerProvider implements MetaServerProvider { @Override public String getMetaServerAddress(Env targetEnv) { return metaServerAddress; } DefaultMetaServerProvider(); @Override String getMetaServerAddress(Env targetEnv); @Override int getOrder(); static final int ORDER; }