test_class.declarator: payload
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private PostgreSQLPacketPayload payload;
test_class.type: PostgreSQLPacketPayload
test_class.var_name: payload
test_class.declarator: sqlxml
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private SQLXML sqlxml;
test_class.type: SQLXML
test_class.var_name: sqlxml
test_class.file: shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/text/PostgreSQLDataRowPacketTest.java
test_class.identifier: PostgreSQLDataRowPacketTest
test_case.body: @Test
      public void assertWriteWithSQLXML() throws SQLException {
          when(sqlxml.getString()).thenReturn("value");
          PostgreSQLDataRowPacket actual = new PostgreSQLDataRowPacket(Collections.singletonList(sqlxml));
          actual.write(payload);
          verify(payload).writeInt4("value".getBytes().length);
          verify(payload).writeStringEOF("value");
      }
test_case.class_method_signature: PostgreSQLDataRowPacketTest.assertWriteWithSQLXML()
test_case.full_signature: @Test public void assertWriteWithSQLXML()
test_case.identifier: assertWriteWithSQLXML
test_case.invocations: thenReturn when getString singletonList write writeInt4 verify getBytes writeStringEOF verify
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void assertWriteWithSQLXML()
focal_class.declarator: messageType = PostgreSQLCommandPacketType.DATA_ROW.getValue()
focal_class.modifier: private final
focal_class.original_string: private final char messageType = PostgreSQLCommandPacketType.DATA_ROW.getValue();
focal_class.type: char
focal_class.var_name: messageType
focal_class.declarator: data
focal_class.modifier: private final
focal_class.original_string: private final List<Object> data;
focal_class.type: List<Object>
focal_class.var_name: data
focal_class.file: shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/main/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/text/PostgreSQLDataRowPacket.java
focal_class.identifier: PostgreSQLDataRowPacket
focal_class.interfaces: implements PostgreSQLPacket
focal_class.class_method_signature: PostgreSQLDataRowPacket.write(final PostgreSQLPacketPayload payload)
focal_class.full_signature: @Override public void write(final PostgreSQLPacketPayload payload)
focal_class.identifier: write
focal_class.modifiers: @Override public
focal_class.parameters: (final PostgreSQLPacketPayload payload)
focal_class.return: void
focal_class.signature: void write(final PostgreSQLPacketPayload payload)
focal_class.class_method_signature: PostgreSQLDataRowPacket.writeSQLXMLData(final PostgreSQLPacketPayload payload, final Object data)
focal_class.full_signature: private void writeSQLXMLData(final PostgreSQLPacketPayload payload, final Object data)
focal_class.identifier: writeSQLXMLData
focal_class.modifiers: private
focal_class.parameters: (final PostgreSQLPacketPayload payload, final Object data)
focal_class.return: void
focal_class.signature: void writeSQLXMLData(final PostgreSQLPacketPayload payload, final Object data)
focal_method.body: @Override
      public void write(final PostgreSQLPacketPayload payload) {
          payload.writeInt2(data.size());
          for (Object each : data) {
              if (null == each) {
                  payload.writeInt4(0xFFFFFFFF);
              } else {
                  if (each instanceof byte[]) {
                      payload.writeInt4(((byte[]) each).length);
                      payload.writeBytes((byte[]) each);
                  } else if (each instanceof SQLXML) {
                      writeSQLXMLData(payload, each);
                  } else {
                      String columnData = each.toString();
                      payload.writeInt4(columnData.getBytes().length);
                      payload.writeStringEOF(columnData);
                  }
              }
          }
      }
focal_method.class_method_signature: PostgreSQLDataRowPacket.write(final PostgreSQLPacketPayload payload)
focal_method.full_signature: @Override public void write(final PostgreSQLPacketPayload payload)
focal_method.identifier: write
focal_method.invocations: writeInt2 size writeInt4 writeInt4 writeBytes writeSQLXMLData toString writeInt4 getBytes writeStringEOF
focal_method.modifiers: @Override public
focal_method.parameters: (final PostgreSQLPacketPayload payload)
focal_method.return: void
focal_method.signature: void write(final PostgreSQLPacketPayload payload)