AddElementsHandler implements OperationHandler<AddElements> { @Override public Void doOperation(final AddElements addElements, final Context context, final Store store) throws OperationException { Iterable<? extends Element> elements = addElements.getInput(); if (addElements.isValidate()) { elements = new ValidatedElements(elements, store.getSchema(), addElements.isSkipInvalidElements()); } addElements(elements, (MapStore) store); return null; }  @Override Void doOperation(final AddElements addElements, final Context context, final Store store);  }
@Test public void shouldAddWithNoGroupByProperties() throws OperationException, StoreException { final AddElements addElements = mock(AddElements.class); given(addElements.getInput()).willReturn((Iterable) Arrays.asList(new Edge("group1"))); final Context context = mock(Context.class); final MapStore store = new SingleUseMapStore(); store.initialise("graphId1", new Schema(), new MapStoreProperties()); final AddElementsHandler handler = new AddElementsHandler(); handler.doOperation(addElements, context, store); }