public static PostgreSQLCommandPacket newInstance(final PostgreSQLCommandPacketType commandPacketType, final PostgreSQLPacketPayload payload) {
        if (!PostgreSQLCommandPacketType.isExtendedProtocolPacketType(commandPacketType)) {
            payload.getByteBuf().skipBytes(1);
            return getPostgreSQLCommandPacket(commandPacketType, payload);
        }
        List<PostgreSQLCommandPacket> result = new ArrayList<>();
        while (payload.hasCompletePacket()) {
            PostgreSQLCommandPacketType type = PostgreSQLCommandPacketType.valueOf(payload.readInt1());
            int length = payload.getByteBuf().getInt(payload.getByteBuf().readerIndex());
            PostgreSQLPacketPayload slicedPayload = new PostgreSQLPacketPayload(payload.getByteBuf().readSlice(length), payload.getCharset());
            result.add(getPostgreSQLCommandPacket(type, slicedPayload));
        }
        return new PostgreSQLAggregatedCommandPacket(result);
    }
@Test
    void assertNewInstanceWithExecuteComPacket() {
        assertThat(PostgreSQLCommandPacketFactory.newInstance(PostgreSQLCommandPacketType.EXECUTE_COMMAND, payload), instanceOf(PostgreSQLAggregatedCommandPacket.class));
    }