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: byteBuf
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private ByteBuf byteBuf;
test_class.type: ByteBuf
test_class.var_name: byteBuf
test_class.declarator: columnDef
test_class.modifier: private
test_class.original_string: private MySQLBinlogColumnDef columnDef;
test_class.type: MySQLBinlogColumnDef
test_class.var_name: columnDef
test_class.file: shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/test/java/org/apache/shardingsphere/db/protocol/mysql/packet/binlog/row/column/value/time/MySQLTimestamp2BinlogProtocolValueTest.java
test_class.identifier: MySQLTimestamp2BinlogProtocolValueTest
test_case.body: @Test
      public void assertReadWithFraction() {
          columnDef.setColumnMeta(1);
          long currentTimeMillis = System.currentTimeMillis();
          int currentSeconds = new Long(currentTimeMillis / 1000).intValue();
          int currentMilliseconds = new Long(currentTimeMillis % 10).intValue();
          when(payload.readInt1()).thenReturn(currentMilliseconds);
          when(byteBuf.readInt()).thenReturn(currentSeconds);
          assertThat(new MySQLTimestamp2BinlogProtocolValue().read(columnDef, payload),
                     is(MySQLTimeValueUtil.getSimpleDateFormat().format(new Timestamp(currentSeconds * 1000L)) + "." + currentMilliseconds));
      }
test_case.class_method_signature: MySQLTimestamp2BinlogProtocolValueTest.assertReadWithFraction()
test_case.full_signature: @Test public void assertReadWithFraction()
test_case.identifier: assertReadWithFraction
test_case.invocations: setColumnMeta currentTimeMillis intValue intValue thenReturn when readInt1 thenReturn when readInt assertThat read is format getSimpleDateFormat
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void assertReadWithFraction()
focal_class.file: shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/main/java/org/apache/shardingsphere/db/protocol/mysql/packet/binlog/row/column/value/time/MySQLTimestamp2BinlogProtocolValue.java
focal_class.identifier: MySQLTimestamp2BinlogProtocolValue
focal_class.interfaces: implements MySQLBinlogProtocolValue
focal_class.class_method_signature: MySQLTimestamp2BinlogProtocolValue.read(final MySQLBinlogColumnDef columnDef, final MySQLPacketPayload payload)
focal_class.full_signature: @Override public Serializable read(final MySQLBinlogColumnDef columnDef, final MySQLPacketPayload payload)
focal_class.identifier: read
focal_class.modifiers: @Override public
focal_class.parameters: (final MySQLBinlogColumnDef columnDef, final MySQLPacketPayload payload)
focal_class.return: Serializable
focal_class.signature: Serializable read(final MySQLBinlogColumnDef columnDef, final MySQLPacketPayload payload)
focal_method.body: @Override
      public Serializable read(final MySQLBinlogColumnDef columnDef, final MySQLPacketPayload payload) {
          int seconds = payload.getByteBuf().readInt();
          if (0 == seconds) {
              return MySQLTimeValueUtil.DATETIME_OF_ZERO;
          }
          String result = MySQLTimeValueUtil.getSimpleDateFormat().format(new Timestamp(seconds * 1000L));
          return columnDef.getColumnMeta() > 0 ? result + new MySQLFractionalSeconds(columnDef.getColumnMeta(), payload) : result;
      }
focal_method.class_method_signature: MySQLTimestamp2BinlogProtocolValue.read(final MySQLBinlogColumnDef columnDef, final MySQLPacketPayload payload)
focal_method.full_signature: @Override public Serializable read(final MySQLBinlogColumnDef columnDef, final MySQLPacketPayload payload)
focal_method.identifier: read
focal_method.invocations: readInt getByteBuf format getSimpleDateFormat getColumnMeta getColumnMeta
focal_method.modifiers: @Override public
focal_method.parameters: (final MySQLBinlogColumnDef columnDef, final MySQLPacketPayload payload)
focal_method.return: Serializable
focal_method.signature: Serializable read(final MySQLBinlogColumnDef columnDef, final MySQLPacketPayload payload)