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.file: shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/test/java/org/apache/shardingsphere/db/protocol/mysql/packet/command/query/binary/execute/protocol/MySQLDateBinaryProtocolValueTest.java
test_class.identifier: MySQLDateBinaryProtocolValueTest
test_case.body: @Test(expected = IllegalArgumentException.class)
      public void assertReadWithIllegalArgument() throws SQLException {
          when(payload.readInt1()).thenReturn(100);
          new MySQLDateBinaryProtocolValue().read(payload);
      }
test_case.class_method_signature: MySQLDateBinaryProtocolValueTest.assertReadWithIllegalArgument()
test_case.full_signature: @Test(expected = IllegalArgumentException.class) public void assertReadWithIllegalArgument()
test_case.identifier: assertReadWithIllegalArgument
test_case.invocations: thenReturn when readInt1 read
test_case.modifiers: @Test(expected = IllegalArgumentException.class) public
test_case.parameters: ()
test_case.return: void
test_case.signature: void assertReadWithIllegalArgument()
focal_class.file: shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/main/java/org/apache/shardingsphere/db/protocol/mysql/packet/command/query/binary/execute/protocol/MySQLDateBinaryProtocolValue.java
focal_class.identifier: MySQLDateBinaryProtocolValue
focal_class.interfaces: implements MySQLBinaryProtocolValue
focal_class.class_method_signature: MySQLDateBinaryProtocolValue.read(final MySQLPacketPayload payload)
focal_class.full_signature: @Override public Object read(final MySQLPacketPayload payload)
focal_class.identifier: read
focal_class.modifiers: @Override public
focal_class.parameters: (final MySQLPacketPayload payload)
focal_class.return: Object
focal_class.signature: Object read(final MySQLPacketPayload payload)
focal_class.class_method_signature: MySQLDateBinaryProtocolValue.getTimestampForDate(final MySQLPacketPayload payload)
focal_class.full_signature: @SuppressWarnings("MagicConstant") private Timestamp getTimestampForDate(final MySQLPacketPayload payload)
focal_class.identifier: getTimestampForDate
focal_class.modifiers: @SuppressWarnings("MagicConstant") private
focal_class.parameters: (final MySQLPacketPayload payload)
focal_class.return: Timestamp
focal_class.signature: Timestamp getTimestampForDate(final MySQLPacketPayload payload)
focal_class.class_method_signature: MySQLDateBinaryProtocolValue.getTimestampForDatetime(final MySQLPacketPayload payload)
focal_class.full_signature: @SuppressWarnings("MagicConstant") private Timestamp getTimestampForDatetime(final MySQLPacketPayload payload)
focal_class.identifier: getTimestampForDatetime
focal_class.modifiers: @SuppressWarnings("MagicConstant") private
focal_class.parameters: (final MySQLPacketPayload payload)
focal_class.return: Timestamp
focal_class.signature: Timestamp getTimestampForDatetime(final MySQLPacketPayload payload)
focal_class.class_method_signature: MySQLDateBinaryProtocolValue.write(final MySQLPacketPayload payload, final Object value)
focal_class.full_signature: @Override public void write(final MySQLPacketPayload payload, final Object value)
focal_class.identifier: write
focal_class.modifiers: @Override public
focal_class.parameters: (final MySQLPacketPayload payload, final Object value)
focal_class.return: void
focal_class.signature: void write(final MySQLPacketPayload payload, final Object value)
focal_class.class_method_signature: MySQLDateBinaryProtocolValue.writeDate(final MySQLPacketPayload payload, final int year, final int month, final int dayOfMonth)
focal_class.full_signature: private void writeDate(final MySQLPacketPayload payload, final int year, final int month, final int dayOfMonth)
focal_class.identifier: writeDate
focal_class.modifiers: private
focal_class.parameters: (final MySQLPacketPayload payload, final int year, final int month, final int dayOfMonth)
focal_class.return: void
focal_class.signature: void writeDate(final MySQLPacketPayload payload, final int year, final int month, final int dayOfMonth)
focal_class.class_method_signature: MySQLDateBinaryProtocolValue.writeTime(final MySQLPacketPayload payload, final int hourOfDay, final int minutes, final int seconds)
focal_class.full_signature: private void writeTime(final MySQLPacketPayload payload, final int hourOfDay, final int minutes, final int seconds)
focal_class.identifier: writeTime
focal_class.modifiers: private
focal_class.parameters: (final MySQLPacketPayload payload, final int hourOfDay, final int minutes, final int seconds)
focal_class.return: void
focal_class.signature: void writeTime(final MySQLPacketPayload payload, final int hourOfDay, final int minutes, final int seconds)
focal_class.class_method_signature: MySQLDateBinaryProtocolValue.writeNanos(final MySQLPacketPayload payload, final int nanos)
focal_class.full_signature: private void writeNanos(final MySQLPacketPayload payload, final int nanos)
focal_class.identifier: writeNanos
focal_class.modifiers: private
focal_class.parameters: (final MySQLPacketPayload payload, final int nanos)
focal_class.return: void
focal_class.signature: void writeNanos(final MySQLPacketPayload payload, final int nanos)
focal_method.body: @Override
      public Object read(final MySQLPacketPayload payload) throws SQLException {
          int length = payload.readInt1();
          switch (length) {
              case 0:
                  throw new SQLFeatureNotSupportedException("Can not support date format if year, month, day is absent.");
              case 4:
                  return getTimestampForDate(payload);
              case 7:
                  return getTimestampForDatetime(payload);
              case 11:
                  Timestamp result = getTimestampForDatetime(payload);
                  result.setNanos(payload.readInt4());
                  return result;
              default:
                  throw new IllegalArgumentException(String.format("Wrong length '%d' of MYSQL_TYPE_TIME", length));
          }
      }
focal_method.class_method_signature: MySQLDateBinaryProtocolValue.read(final MySQLPacketPayload payload)
focal_method.full_signature: @Override public Object read(final MySQLPacketPayload payload)
focal_method.identifier: read
focal_method.invocations: readInt1 getTimestampForDate getTimestampForDatetime getTimestampForDatetime setNanos readInt4 format
focal_method.modifiers: @Override public
focal_method.parameters: (final MySQLPacketPayload payload)
focal_method.return: Object
focal_method.signature: Object read(final MySQLPacketPayload payload)