@Test public void testGetOperation() { final OperationEntry optentry = new OperationEntry(ExplainCommand.class); final List<OperationEntry> entries = new ArrayList<>(); entries.add(optentry); final OperationRegistry optreg = new OperationRegistry(entries); assertEquals("explain", optreg.getOperation(ExplainCommand.class).getOperationNames()[0]); assertEquals(true, optreg.getAllOperations().contains(optentry)); }
public OperationEntry getOperation(final Class<?> operationClass) { return operationMapByClass.get(operationClass); }
OperationRegistry { public OperationEntry getOperation(final Class<?> operationClass) { return operationMapByClass.get(operationClass); } }
OperationRegistry { public OperationEntry getOperation(final Class<?> operationClass) { return operationMapByClass.get(operationClass); } OperationRegistry();  OperationRegistry(final List<OperationEntry> entries); }
OperationRegistry { public OperationEntry getOperation(final Class<?> operationClass) { return operationMapByClass.get(operationClass); } OperationRegistry();  OperationRegistry(final List<OperationEntry> entries); static OperationRegistry getInstance(); Collection<OperationEntry> getAllOperations(); OperationEntry getOperation(final Class<?> operationClass); }
OperationRegistry { public OperationEntry getOperation(final Class<?> operationClass) { return operationMapByClass.get(operationClass); } OperationRegistry();  OperationRegistry(final List<OperationEntry> entries); static OperationRegistry getInstance(); Collection<OperationEntry> getAllOperations(); OperationEntry getOperation(final Class<?> operationClass);  }