@Test public void testLoggerScopeUsingLoggerProperty() throws Exception { expect(systemConf.getCustom(getCustomPropertySuffix(ChooserScope.LOGGER))) .andReturn(MockChooser1.class.getName()).once(); expect(serviceEnv.instantiate(MockChooser1.class.getName(), VolumeChooser.class)) .andReturn(new MockChooser1()); replay(serviceEnv, tableConf, systemConf); VolumeChooser delegate = getDelegate(ChooserScope.LOGGER); assertSame(MockChooser1.class, delegate.getClass()); }
private static final String getCustomPropertySuffix(ChooserScope scope) { return "volume.chooser." + scope.name().toLowerCase(); }
PerTableVolumeChooser implements VolumeChooser { private static final String getCustomPropertySuffix(ChooserScope scope) { return "volume.chooser." + scope.name().toLowerCase(); } }
PerTableVolumeChooser implements VolumeChooser { private static final String getCustomPropertySuffix(ChooserScope scope) { return "volume.chooser." + scope.name().toLowerCase(); }  }
PerTableVolumeChooser implements VolumeChooser { private static final String getCustomPropertySuffix(ChooserScope scope) { return "volume.chooser." + scope.name().toLowerCase(); }  @Override String choose(VolumeChooserEnvironment env, Set<String> options); @Override Set<String> choosable(VolumeChooserEnvironment env, Set<String> options); }
PerTableVolumeChooser implements VolumeChooser { private static final String getCustomPropertySuffix(ChooserScope scope) { return "volume.chooser." + scope.name().toLowerCase(); }  @Override String choose(VolumeChooserEnvironment env, Set<String> options); @Override Set<String> choosable(VolumeChooserEnvironment env, Set<String> options);  }