ExtractId extends KorypheFunction<Element, Object> { public IdentifierType getId() { return id; } ExtractId();  ExtractId(final IdentifierType id); @Override Object apply(final Element element); @Override boolean equals(final Object obj); @Override int hashCode(); @Override String toString(); IdentifierType getId(); void setId(final IdentifierType id);  }
@Test @Override public void shouldJsonSerialiseAndDeserialise() throws SerialisationException { final ExtractId function = getInstance(); final byte[] json = JSONSerialiser.serialise(function); final ExtractId deserialisedObj = JSONSerialiser.deserialise(json, ExtractId.class); final String expectedJson = "{\"class\":\"uk.gov.gchq.gaffer.data.element.function.ExtractId\",\"id\":\"SOURCE\"}"; JsonAssert.assertEquals(expectedJson, new String(json)); assertEquals(IdentifierType.SOURCE, deserialisedObj.getId()); }