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/MySQLTimeBinaryProtocolValueTest.java
test_class.identifier: MySQLTimeBinaryProtocolValueTest
test_case.body: @Test
      public void assertReadWithTwelveBytes() {
          when(payload.readInt1()).thenReturn(12, 0, 10, 59, 0);
          Calendar actual = Calendar.getInstance();
          actual.setTimeInMillis(((Timestamp) new MySQLTimeBinaryProtocolValue().read(payload)).getTime());
          assertThat(actual.get(Calendar.HOUR_OF_DAY), is(10));
          assertThat(actual.get(Calendar.MINUTE), is(59));
          assertThat(actual.get(Calendar.SECOND), is(0));
      }
test_case.class_method_signature: MySQLTimeBinaryProtocolValueTest.assertReadWithTwelveBytes()
test_case.full_signature: @Test public void assertReadWithTwelveBytes()
test_case.identifier: assertReadWithTwelveBytes
test_case.invocations: thenReturn when readInt1 getInstance setTimeInMillis getTime read assertThat get is assertThat get is assertThat get is
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void assertReadWithTwelveBytes()
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/MySQLTimeBinaryProtocolValue.java
focal_class.identifier: MySQLTimeBinaryProtocolValue
focal_class.interfaces: implements MySQLBinaryProtocolValue
focal_class.class_method_signature: MySQLTimeBinaryProtocolValue.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: MySQLTimeBinaryProtocolValue.getTimestamp(final MySQLPacketPayload payload)
focal_class.full_signature: private Timestamp getTimestamp(final MySQLPacketPayload payload)
focal_class.identifier: getTimestamp
focal_class.modifiers: private
focal_class.parameters: (final MySQLPacketPayload payload)
focal_class.return: Timestamp
focal_class.signature: Timestamp getTimestamp(final MySQLPacketPayload payload)
focal_class.class_method_signature: MySQLTimeBinaryProtocolValue.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: MySQLTimeBinaryProtocolValue.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: MySQLTimeBinaryProtocolValue.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) {
          int length = payload.readInt1();
          payload.readInt1();
          payload.readInt4();
          switch (length) {
              case 0:
                  return new Timestamp(0L);
              case 8:
                  return getTimestamp(payload);
              case 12:
                  Timestamp result = getTimestamp(payload);
                  result.setNanos(payload.readInt4());
                  return result;
              default:
                  throw new IllegalArgumentException(String.format("Wrong length '%d' of MYSQL_TYPE_DATE", length));
          }
      }
focal_method.class_method_signature: MySQLTimeBinaryProtocolValue.read(final MySQLPacketPayload payload)
focal_method.full_signature: @Override public Object read(final MySQLPacketPayload payload)
focal_method.identifier: read
focal_method.invocations: readInt1 readInt1 readInt4 getTimestamp getTimestamp 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)