### Question:
OzoneObjInfo extends OzoneObj { @Override public String getKeyName() { return name; } private  OzoneObjInfo(ResourceType resType, StoreType storeType,
      String volumeName, String bucketName, String name); @Override String getPath(); @Override String getVolumeName(); @Override String getBucketName(); @Override String getKeyName(); @Override String getPrefixName(); static OzoneObjInfo fromProtobuf(OzoneManagerProtocolProtos.OzoneObj
      proto);  }### Answer:
@Test public void testGetKeyName() { objInfo = getBuilder(volume, bucket, key).build(); assertEquals(objInfo.getKeyName(), key); objInfo = getBuilder(volume, null, null).build(); assertEquals(objInfo.getKeyName(), null); objInfo = getBuilder(null, bucket, null).build(); assertEquals(objInfo.getKeyName(), null); objInfo = getBuilder(null, null, key).build(); assertEquals(objInfo.getKeyName(), key); }