test_class.declarator: payload
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private MySQLPacketPayload payload;
test_class.type: MySQLPacketPayload
test_class.var_name: payload
test_class.declarator: part1 = {106, 105, 55, 122, 117, 98, 115, 109}
test_class.modifier: private final
test_class.original_string: private final byte[] part1 = {106, 105, 55, 122, 117, 98, 115, 109};
test_class.type: byte[]
test_class.var_name: part1
test_class.declarator: part2 = {68, 102, 53, 122, 65, 49, 84, 79, 85, 115, 116, 113}
test_class.modifier: private final
test_class.original_string: private final byte[] part2 = {68, 102, 53, 122, 65, 49, 84, 79, 85, 115, 116, 113};
test_class.type: byte[]
test_class.var_name: part2
test_class.file: shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/test/java/org/apache/shardingsphere/db/protocol/mysql/packet/handshake/MySQLHandshakePacketTest.java
test_class.identifier: MySQLHandshakePacketTest
test_case.body: @Test
      public void assertWrite() {
          MySQLAuthPluginData authPluginData = new MySQLAuthPluginData(part1, part2);
          new MySQLHandshakePacket(1000, authPluginData).write(payload);
          verify(payload).writeInt1(MySQLServerInfo.PROTOCOL_VERSION);
          verify(payload).writeStringNul(MySQLServerInfo.getServerVersion());
          verify(payload).writeInt4(1000);
          verify(payload).writeStringNul(new String(authPluginData.getAuthPluginDataPart1()));
          verify(payload).writeInt2(MySQLCapabilityFlag.calculateHandshakeCapabilityFlagsLower());
          verify(payload).writeInt1(MySQLServerInfo.CHARSET);
          verify(payload).writeInt2(MySQLStatusFlag.SERVER_STATUS_AUTOCOMMIT.getValue());
          verify(payload).writeInt2(MySQLCapabilityFlag.calculateHandshakeCapabilityFlagsUpper());
          verify(payload).writeInt1(authPluginData.getAuthPluginData().length + 1);
          verify(payload).writeReserved(10);
          verify(payload).writeStringNul(new String(authPluginData.getAuthPluginDataPart2()));
      }
test_case.class_method_signature: MySQLHandshakePacketTest.assertWrite()
test_case.full_signature: @Test public void assertWrite()
test_case.identifier: assertWrite
test_case.invocations: write writeInt1 verify writeStringNul verify getServerVersion writeInt4 verify writeStringNul verify getAuthPluginDataPart1 writeInt2 verify calculateHandshakeCapabilityFlagsLower writeInt1 verify writeInt2 verify getValue writeInt2 verify calculateHandshakeCapabilityFlagsUpper writeInt1 verify getAuthPluginData writeReserved verify writeStringNul verify getAuthPluginDataPart2
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void assertWrite()
focal_class.declarator: protocolVersion = MySQLServerInfo.PROTOCOL_VERSION
focal_class.modifier: private final
focal_class.original_string: private final int protocolVersion = MySQLServerInfo.PROTOCOL_VERSION;
focal_class.type: int
focal_class.var_name: protocolVersion
focal_class.declarator: serverVersion
focal_class.modifier: private final
focal_class.original_string: private final String serverVersion;
focal_class.type: String
focal_class.var_name: serverVersion
focal_class.declarator: connectionId
focal_class.modifier: private final
focal_class.original_string: private final int connectionId;
focal_class.type: int
focal_class.var_name: connectionId
focal_class.declarator: capabilityFlagsLower
focal_class.modifier: private final
focal_class.original_string: private final int capabilityFlagsLower;
focal_class.type: int
focal_class.var_name: capabilityFlagsLower
focal_class.declarator: characterSet
focal_class.modifier: private final
focal_class.original_string: private final int characterSet;
focal_class.type: int
focal_class.var_name: characterSet
focal_class.declarator: statusFlag
focal_class.modifier: private final
focal_class.original_string: private final MySQLStatusFlag statusFlag;
focal_class.type: MySQLStatusFlag
focal_class.var_name: statusFlag
focal_class.declarator: authPluginData
focal_class.modifier: private final
focal_class.original_string: private final MySQLAuthPluginData authPluginData;
focal_class.type: MySQLAuthPluginData
focal_class.var_name: authPluginData
focal_class.declarator: capabilityFlagsUpper
focal_class.modifier: private
focal_class.original_string: private int capabilityFlagsUpper;
focal_class.type: int
focal_class.var_name: capabilityFlagsUpper
focal_class.declarator: authPluginName
focal_class.modifier: private
focal_class.original_string: private String authPluginName;
focal_class.type: String
focal_class.var_name: authPluginName
focal_class.file: shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/main/java/org/apache/shardingsphere/db/protocol/mysql/packet/handshake/MySQLHandshakePacket.java
focal_class.identifier: MySQLHandshakePacket
focal_class.interfaces: implements MySQLPacket
focal_class.class_method_signature: MySQLHandshakePacket.MySQLHandshakePacket(final int connectionId, final MySQLAuthPluginData authPluginData)
focal_class.full_signature: public  MySQLHandshakePacket(final int connectionId, final MySQLAuthPluginData authPluginData)
focal_class.identifier: MySQLHandshakePacket
focal_class.modifiers: public
focal_class.parameters: (final int connectionId, final MySQLAuthPluginData authPluginData)
focal_class.signature:  MySQLHandshakePacket(final int connectionId, final MySQLAuthPluginData authPluginData)
focal_class.class_method_signature: MySQLHandshakePacket.MySQLHandshakePacket(final MySQLPacketPayload payload)
focal_class.full_signature: public  MySQLHandshakePacket(final MySQLPacketPayload payload)
focal_class.identifier: MySQLHandshakePacket
focal_class.modifiers: public
focal_class.parameters: (final MySQLPacketPayload payload)
focal_class.signature:  MySQLHandshakePacket(final MySQLPacketPayload payload)
focal_class.class_method_signature: MySQLHandshakePacket.readAuthPluginDataPart2(final MySQLPacketPayload payload)
focal_class.full_signature: private byte[] readAuthPluginDataPart2(final MySQLPacketPayload payload)
focal_class.identifier: readAuthPluginDataPart2
focal_class.modifiers: private
focal_class.parameters: (final MySQLPacketPayload payload)
focal_class.return: byte[]
focal_class.signature: byte[] readAuthPluginDataPart2(final MySQLPacketPayload payload)
focal_class.class_method_signature: MySQLHandshakePacket.readAuthPluginName(final MySQLPacketPayload payload)
focal_class.full_signature: private String readAuthPluginName(final MySQLPacketPayload payload)
focal_class.identifier: readAuthPluginName
focal_class.modifiers: private
focal_class.parameters: (final MySQLPacketPayload payload)
focal_class.return: String
focal_class.signature: String readAuthPluginName(final MySQLPacketPayload payload)
focal_class.class_method_signature: MySQLHandshakePacket.setAuthPluginName(final MySQLAuthenticationMethod mysqlAuthenticationMethod)
focal_class.full_signature: public void setAuthPluginName(final MySQLAuthenticationMethod mysqlAuthenticationMethod)
focal_class.identifier: setAuthPluginName
focal_class.modifiers: public
focal_class.parameters: (final MySQLAuthenticationMethod mysqlAuthenticationMethod)
focal_class.return: void
focal_class.signature: void setAuthPluginName(final MySQLAuthenticationMethod mysqlAuthenticationMethod)
focal_class.class_method_signature: MySQLHandshakePacket.write(final MySQLPacketPayload payload)
focal_class.full_signature: @Override public void write(final MySQLPacketPayload payload)
focal_class.identifier: write
focal_class.modifiers: @Override public
focal_class.parameters: (final MySQLPacketPayload payload)
focal_class.return: void
focal_class.signature: void write(final MySQLPacketPayload payload)
focal_class.class_method_signature: MySQLHandshakePacket.writeAuthPluginDataPart2(final MySQLPacketPayload payload)
focal_class.full_signature: private void writeAuthPluginDataPart2(final MySQLPacketPayload payload)
focal_class.identifier: writeAuthPluginDataPart2
focal_class.modifiers: private
focal_class.parameters: (final MySQLPacketPayload payload)
focal_class.return: void
focal_class.signature: void writeAuthPluginDataPart2(final MySQLPacketPayload payload)
focal_class.class_method_signature: MySQLHandshakePacket.writeAuthPluginName(final MySQLPacketPayload payload)
focal_class.full_signature: private void writeAuthPluginName(final MySQLPacketPayload payload)
focal_class.identifier: writeAuthPluginName
focal_class.modifiers: private
focal_class.parameters: (final MySQLPacketPayload payload)
focal_class.return: void
focal_class.signature: void writeAuthPluginName(final MySQLPacketPayload payload)
focal_class.class_method_signature: MySQLHandshakePacket.isClientSecureConnection()
focal_class.full_signature: private boolean isClientSecureConnection()
focal_class.identifier: isClientSecureConnection
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isClientSecureConnection()
focal_class.class_method_signature: MySQLHandshakePacket.isClientPluginAuth()
focal_class.full_signature: private boolean isClientPluginAuth()
focal_class.identifier: isClientPluginAuth
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isClientPluginAuth()
focal_class.class_method_signature: MySQLHandshakePacket.getSequenceId()
focal_class.full_signature: @Override public int getSequenceId()
focal_class.identifier: getSequenceId
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getSequenceId()
focal_method.body: @Override
      public void write(final MySQLPacketPayload payload) {
          payload.writeInt1(protocolVersion);
          payload.writeStringNul(serverVersion);
          payload.writeInt4(connectionId);
          payload.writeStringNul(new String(authPluginData.getAuthPluginDataPart1()));
          payload.writeInt2(capabilityFlagsLower);
          payload.writeInt1(characterSet);
          payload.writeInt2(statusFlag.getValue());
          payload.writeInt2(capabilityFlagsUpper);
          payload.writeInt1(isClientPluginAuth() ? authPluginData.getAuthPluginData().length + 1 : 0);
          payload.writeReserved(10);
          writeAuthPluginDataPart2(payload);
          writeAuthPluginName(payload);
      }
focal_method.class_method_signature: MySQLHandshakePacket.write(final MySQLPacketPayload payload)
focal_method.full_signature: @Override public void write(final MySQLPacketPayload payload)
focal_method.identifier: write
focal_method.invocations: writeInt1 writeStringNul writeInt4 writeStringNul getAuthPluginDataPart1 writeInt2 writeInt1 writeInt2 getValue writeInt2 writeInt1 isClientPluginAuth getAuthPluginData writeReserved writeAuthPluginDataPart2 writeAuthPluginName
focal_method.modifiers: @Override public
focal_method.parameters: (final MySQLPacketPayload payload)
focal_method.return: void
focal_method.signature: void write(final MySQLPacketPayload payload)