@Test
public void shouldSerializeToStringUsingInterfaceDefaultMethodIfNotStringSerializer() throws Exception {

    Serializer serializer = mock(Serializer.class);
    ByteArrayOutputStream mockByteArrayOutputStream = mock(ByteArrayOutputStream.class);
    whenNew(ByteArrayOutputStream.class).withNoArguments().thenReturn(mockByteArrayOutputStream);
    when(mockByteArrayOutputStream.toByteArray()).thenReturn(SOME_STRING_UTF8_BYTES);
    String actual = Serializers.serialize(serializer, "arg", UTF8);
    assertEquals(SOME_STRING, actual);
    verify(serializer).serialize("arg", UTF8, mockByteArrayOutputStream);
}