@Test
  public void testIsEOF() throws Exception {
    for (Method method : InvalidProtocolBufferException.class.getDeclaredMethods()) {
      if (
        method.getParameterCount() == 0
          && method.getReturnType() == InvalidProtocolBufferException.class
      ) {
        method.setAccessible(true);
        InvalidProtocolBufferException e = (InvalidProtocolBufferException) method.invoke(null);
        assertEquals(method.getName().equals("truncatedMessage"), ProtobufUtil.isEOF(e));
      }
    }
  }
Used to confirm that we only consider truncatedMessage as EOF
hbase-client/src/test/java/org/apache/hadoop/hbase/shaded/protobuf/TestProtobufUtil.java