GetElementsWithinSet implements
        InputOutput<Iterable<? extends EntityId>, CloseableIterable<? extends Element>>,
        MultiEntityIdInput,
        GraphFilters { @Override public Iterable<? extends EntityId> getInput() { return input; }  @Override View getView(); @Override void setView(final View view); @Override DirectedType getDirectedType(); @Override void setDirectedType(final DirectedType directedType); @Override Iterable<? extends EntityId> getInput(); @Override void setInput(final Iterable<? extends EntityId> input); @Override TypeReference<CloseableIterable<? extends Element>> getOutputTypeReference(); @Override Map<String, String> getOptions(); @Override void setOptions(final Map<String, String> options); @Override GetElementsWithinSet shallowClone();  }
@Test public void shouldJSONSerialiseAndDeserialise() throws SerialisationException { final GetElementsWithinSet op = new GetElementsWithinSet.Builder() .input(AccumuloTestData.SEED_SOURCE_1, AccumuloTestData.SEED_DESTINATION_1, AccumuloTestData.SEED_SOURCE_2, AccumuloTestData.SEED_DESTINATION_2) .build(); byte[] json = JSONSerialiser.serialise(op, true); final GetElementsWithinSet deserialisedOp = JSONSerialiser.deserialise(json, GetElementsWithinSet.class); final Iterator itrSeedsA = deserialisedOp.getInput().iterator(); assertEquals(AccumuloTestData.SEED_SOURCE_1, itrSeedsA.next()); assertEquals(AccumuloTestData.SEED_DESTINATION_1, itrSeedsA.next()); assertEquals(AccumuloTestData.SEED_SOURCE_2, itrSeedsA.next()); assertEquals(AccumuloTestData.SEED_DESTINATION_2, itrSeedsA.next()); assertFalse(itrSeedsA.hasNext()); }
@Test public void shouldCreateInputFromVertices() { final GetElementsWithinSet op = new GetElementsWithinSet.Builder() .input(AccumuloTestData.SEED_B, AccumuloTestData.SEED_B1.getVertex()) .build(); assertEquals( Lists.newArrayList(AccumuloTestData.SEED_B, AccumuloTestData.SEED_B1), Lists.newArrayList(op.getInput()) ); }