public static PostgreSQLErrorResponsePacket newInstance(final Exception cause) {
        Optional<ServerErrorMessage> serverErrorMessage = findServerErrorMessage(cause);
        return serverErrorMessage.map(PostgreSQLErrorPacketFactory::createErrorResponsePacket)
                .orElseGet(() -> createErrorResponsePacket(SQLExceptionTransformEngine.toSQLException(cause, DATABASE_TYPE)));
    }
@Test
    void assertRuntimeException() throws ReflectiveOperationException {
        PostgreSQLErrorResponsePacket actual = PostgreSQLErrorPacketFactory.newInstance(new RuntimeException("No reason"));
        Map<Character, String> fields = (Map<Character, String>) Plugins.getMemberAccessor().get(PostgreSQLErrorResponsePacket.class.getDeclaredField("fields"), actual);
        assertThat(fields.get(PostgreSQLErrorResponsePacket.FIELD_TYPE_MESSAGE), is("Unknown exception." + System.lineSeparator() + "More details: java.lang.RuntimeException: No reason"));
    }