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 assertNewWithPayload() {
          when(payload.readInt1()).thenReturn(0, MySQLServerInfo.PROTOCOL_VERSION, MySQLServerInfo.CHARSET, 0);
          when(payload.readStringNul()).thenReturn(MySQLServerInfo.getServerVersion());
          when(payload.readStringNulByBytes()).thenReturn(part1, part2);
          when(payload.readInt4()).thenReturn(1000);
          when(payload.readInt2()).thenReturn(
                  MySQLCapabilityFlag.calculateHandshakeCapabilityFlagsLower(), MySQLStatusFlag.SERVER_STATUS_AUTOCOMMIT.getValue(), MySQLCapabilityFlag.calculateHandshakeCapabilityFlagsUpper());
          MySQLHandshakePacket actual = new MySQLHandshakePacket(payload);
          assertThat(actual.getSequenceId(), is(0));
          assertThat(actual.getServerVersion(), is(MySQLServerInfo.getServerVersion()));
          assertThat(actual.getCapabilityFlagsLower(), is(MySQLCapabilityFlag.calculateHandshakeCapabilityFlagsLower()));
          assertThat(actual.getConnectionId(), is(1000));
          assertThat(actual.getCharacterSet(), is(MySQLServerInfo.CHARSET));
          assertThat(actual.getStatusFlag(), is(MySQLStatusFlag.SERVER_STATUS_AUTOCOMMIT));
          assertThat(actual.getCapabilityFlagsUpper(), is(MySQLCapabilityFlag.calculateHandshakeCapabilityFlagsUpper()));
          assertThat(actual.getAuthPluginData().getAuthPluginDataPart1(), is(part1));
          assertThat(actual.getAuthPluginData().getAuthPluginDataPart2(), is(part2));
          verify(payload).skipReserved(10);
      }
test_case.class_method_signature: MySQLHandshakePacketTest.assertNewWithPayload()
test_case.full_signature: @Test public void assertNewWithPayload()
test_case.identifier: assertNewWithPayload
test_case.invocations: thenReturn when readInt1 thenReturn when readStringNul getServerVersion thenReturn when readStringNulByBytes thenReturn when readInt4 thenReturn when readInt2 calculateHandshakeCapabilityFlagsLower getValue calculateHandshakeCapabilityFlagsUpper assertThat getSequenceId is assertThat getServerVersion is getServerVersion assertThat getCapabilityFlagsLower is calculateHandshakeCapabilityFlagsLower assertThat getConnectionId is assertThat getCharacterSet is assertThat getStatusFlag is assertThat getCapabilityFlagsUpper is calculateHandshakeCapabilityFlagsUpper assertThat getAuthPluginDataPart1 getAuthPluginData is assertThat getAuthPluginDataPart2 getAuthPluginData is skipReserved verify
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void assertNewWithPayload()
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 int getSequenceId() {
          return 0;
      }
focal_method.class_method_signature: MySQLHandshakePacket.getSequenceId()
focal_method.full_signature: @Override public int getSequenceId()
focal_method.identifier: getSequenceId
focal_method.modifiers: @Override public
focal_method.parameters: ()
focal_method.return: int
focal_method.signature: int getSequenceId()