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