@Override
  public OutputFile newOutputFile(String path) {
    return new OSSOutputFile(client(), new OSSURI(path), aliyunProperties, metrics);
  }
@Test
  public void testOutputFile() throws IOException {
    String location = randomLocation();
    int dataSize = 1024 * 10;
    byte[] data = randomData(dataSize);

    OutputFile out = fileIO().newOutputFile(location);
    writeOSSData(out, data);

    OSSURI uri = new OSSURI(location);
    assertThat(ossClient().get().doesObjectExist(uri.bucket(), uri.key()))
        .as("OSS file should exist")
        .isTrue();
    assertThat(out.location()).as("Should have expected location").isEqualTo(location);
    assertThat(ossDataLength(uri)).as("Should have expected length").isEqualTo(dataSize);
    assertThat(ossDataContent(uri, dataSize)).as("Should have expected content").isEqualTo(data);
  }