GetAllElementsHandler implements OutputOperationHandler<GetAllElements, CloseableIterable<? extends Element>> { @Override public CloseableIterable<? extends Element> doOperation(final GetAllElements operation, final Context context, final Store store) throws OperationException { return doOperation(operation, context.getUser(), (HBaseStore) store); }  @Override CloseableIterable<? extends Element> doOperation(final GetAllElements operation, final Context context, final Store store);  }
@Test public void shouldReturnHBaseRetriever() throws OperationException, StoreException { final Context context = mock(Context.class); final User user = mock(User.class); final HBaseStore store = mock(HBaseStore.class); final HBaseRetriever<GetAllElements> hbaseRetriever = mock(HBaseRetriever.class); final GetAllElementsHandler handler = new GetAllElementsHandler(); final GetAllElements getElements = new GetAllElements(); given(context.getUser()).willReturn(user); given(store.createRetriever(getElements, user, null, false, ElementDedupeFilterProcessor.class)).willReturn(hbaseRetriever); final HBaseRetriever<GetAllElements> result = (HBaseRetriever<GetAllElements>) handler.doOperation(getElements, context, store); assertSame(hbaseRetriever, result); }