@Test public void testTableScopeUsingDefaultScopeProperty() throws Exception { expect(tableConf.getTableCustom(TABLE_CUSTOM_SUFFIX)).andReturn(null).once(); expect(systemConf.getCustom(getCustomPropertySuffix(ChooserScope.DEFAULT))) .andReturn(MockChooser2.class.getName()).once(); expect(serviceEnv.instantiate(TableId.of("testTable"), MockChooser2.class.getName(), VolumeChooser.class)).andReturn(new MockChooser2()); replay(serviceEnv, tableConf, systemConf); VolumeChooser delegate = getTableDelegate(); assertSame(MockChooser2.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);  }