@Override
  public boolean createEmptyObject(String key) {
    try {
      GSObject obj = new GSObject(key);
      obj.setDataInputStream(new ByteArrayInputStream(new byte[0]));
      obj.setContentLength(0);
      obj.setMd5Hash(DIR_HASH);
      obj.setContentType(Mimetypes.MIMETYPE_BINARY_OCTET_STREAM);
      mClient.putObject(mBucketName, obj);
      return true;
    } catch (ServiceException e) {
      LOG.error("Failed to create directory: {}", key, e);
      return false;
    }
  }
@Test
  public void testCreateEmptyObject() throws ServiceException {

    // test successful create empty object
    Mockito.when(mClient.putObject(ArgumentMatchers.anyString(),
            ArgumentMatchers.any(GSObject.class))).thenReturn(null);
    boolean result = mGCSUnderFileSystem.createEmptyObject(KEY);
    Assert.assertTrue(result);

    // test create empty object exception
    Mockito.when(mClient.putObject(ArgumentMatchers.anyString(),
            ArgumentMatchers.any(GSObject.class))).thenThrow(ServiceException.class);
    try {
      mGCSUnderFileSystem.createEmptyObject(KEY);
    } catch (Exception e) {
      Assert.assertTrue(e instanceof ServiceException);
    }
  }