use of org.apache.hadoop.hbase.security.visibility.VisibilityController in project hbase by apache.
the class TestMasterCoprocessorServices method testVisibilityLabelServices.
@Test
public void testVisibilityLabelServices() {
MasterCoprocessor defaultImpl = new VisibilityController();
MasterCoprocessor customImpl = new MockVisibilityController();
MasterCoprocessor unrelatedImpl = new JMXListener();
assertTrue(masterServices.checkCoprocessorWithService(Collections.singletonList(defaultImpl), VisibilityLabelsService.Interface.class));
assertTrue(masterServices.checkCoprocessorWithService(Collections.singletonList(customImpl), VisibilityLabelsService.Interface.class));
assertFalse(masterServices.checkCoprocessorWithService(Collections.emptyList(), VisibilityLabelsService.Interface.class));
assertFalse(masterServices.checkCoprocessorWithService(null, VisibilityLabelsService.Interface.class));
assertFalse(masterServices.checkCoprocessorWithService(Collections.singletonList(unrelatedImpl), VisibilityLabelsService.Interface.class));
assertTrue(masterServices.checkCoprocessorWithService(Arrays.asList(unrelatedImpl, customImpl), VisibilityLabelsService.Interface.class));
assertTrue(masterServices.checkCoprocessorWithService(Arrays.asList(unrelatedImpl, defaultImpl), VisibilityLabelsService.Interface.class));
}
Aggregations