SerializerException extends IOException implements Stringable { @Override public String toString() { return MoreObjects.toStringHelper(getClass()) .omitNullValues() .addValue(getMessage()) .add("method", methodName) .add("type", callType) .add("seq", methodName == null ? null : sequenceNo) .add("exception", exceptionType) .toString(); } SerializerException(String format, Object... args);  SerializerException(Throwable cause, String format, Object... args);  SerializerException(SerializerException cause); String getMethodName(); PServiceCallType getCallType(); int getSequenceNo(); PApplicationExceptionType getExceptionType(); SerializerException setMethodName(String methodName); SerializerException setCallType(PServiceCallType callType); SerializerException setSequenceNo(int sequenceNo); SerializerException setExceptionType(PApplicationExceptionType type); @Override String toString(); @Override String asString();  }
@Test public void testToString() { assertThat(new SerializerException("Message").toString(), is("SerializerException{Message, exception=PROTOCOL_ERROR}")); assertThat(new SerializerException("Message").setMethodName("foo") .setCallType(PServiceCallType.CALL) .setSequenceNo(123) .toString(), is("SerializerException{Message, method=foo, type=CALL, seq=123, exception=PROTOCOL_ERROR}")); }