@Override
  public int read() throws IOException {
    checkAndUseNewPos();
    pos += 1;
    readBytes.increment();
    readOperations.increment();
    return internalStream.read();
  }
@Test
  public void testReadBytes() throws IOException {
    String objectName = rule.randomObjectName();
    rule.client()
        .putObject(new PutObjectRequest(rule.bucket(), objectName, "0123456789".getBytes()));

    try (EcsSeekableInputStream input =
        new EcsSeekableInputStream(
            rule.client(), new EcsURI(rule.bucket(), objectName), MetricsContext.nullMetrics())) {
      byte[] buffer = new byte[3];
      assertThat(input.read(buffer)).as("The first read should be 3 bytes").isEqualTo(3);
      assertThat(new String(buffer, StandardCharsets.UTF_8))
          .as("The first 3 bytes should be 012")
          .isEqualTo("012");
    }
  }