FastJsonSerialization implements Serialization { @Override public ObjectInput deserialize(URL url, InputStream input) throws IOException { return new FastJsonObjectInput(input); }  @Override byte getContentTypeId(); @Override String getContentType(); @Override ObjectOutput serialize(URL url, OutputStream output); @Override ObjectInput deserialize(URL url, InputStream input);  }
@Test public void testObjectInput() throws IOException { ObjectInput objectInput = fastJsonSerialization.deserialize(null, mock(InputStream.class)); assertThat(objectInput, Matchers.<ObjectInput>instanceOf(FastJsonObjectInput.class)); }