### Question:
PacketLengthUtil { public static boolean isPacketTooLargeException(Throwable cause) { if (cause instanceof PacketTooLargeException) { return true; } if (cause instanceof DecoderException) { return isPacketTooLargeException(cause.getCause()); } return false; }  static void checkValidLength(int length); static boolean isValidPayload(byte[] payload); static void trySendErr2Client(SqlSessionContext sqlCtx, Throwable cause,
        Supplier<byte[]> errMsg); static boolean isPacketTooLargeException(Throwable cause); static ErrorResponse buildPGPktTooLargeErr(String file, String routine); static final String PKT_TOO_LARGE_ERR; }### Answer:
@Test public void testIsPacketTooLargeException() { PacketTooLargeException tooLargeExeption = new PacketTooLargeException("too large"); QuitException quitException = new QuitException("quit"); Assert.assertTrue(PacketLengthUtil.isPacketTooLargeException(tooLargeExeption)); Assert.assertFalse(PacketLengthUtil.isPacketTooLargeException(quitException)); DecoderException decoderTooLargeException = new DecoderException(tooLargeExeption); Assert.assertTrue(PacketLengthUtil.isPacketTooLargeException(decoderTooLargeException)); DecoderException decoderQuitException = new DecoderException(quitException); Assert.assertFalse(PacketLengthUtil.isPacketTooLargeException(decoderQuitException)); }