public String toServerErrorMessage() {
        return fields.entrySet().stream().map(entry -> entry.getKey() + entry.getValue()).collect(Collectors.joining("\0"));
    }
@Test
    void assertToServerErrorMessage() {
        PostgreSQLErrorResponsePacket responsePacket = createErrorResponsePacket();
        String expectedMessage = "SFATAL\0VFATAL\0C3D000\0Mdatabase \"test\" does not exist\0Ddetail\0Hhint\0P1\0p2\0qinternal query\0"
                + "Wwhere\0stest\0ttable\0ccolumn\0ddata type\0nconstraint\0Ffile\0L3\0Rroutine";
        assertThat(responsePacket.toServerErrorMessage(), is(expectedMessage));
    }