@Test
public void testNewInstanceMethod()
{

  NoNewInstanceStatefulStreamCodec codec = new NoNewInstanceStatefulStreamCodec();
  DefaultStatefulStreamCodec newCodec = codec.newInstance();
  Assert.assertNotEquals("Codec and newCodec are not same ", codec, newCodec);
  Assert.assertEquals("Class of codec and newCodec is same ", newCodec.getClass(), codec.getClass());
}