### Question:
VolumeUtils { public static String buildSingleVolumePath(int volumeCount, String directory) { String prefix = volumeCount > 0 ? VOLUME_PREFIX : ROOT_VOLUME_PREFIX; return buildVolumePathString(FIRST_VOLUME, directory, prefix); } private  VolumeUtils(); static String buildVolumePathString(int volumeCount, String directory); static String buildVolumePathStringZeroVolumeHandled(int volumeCount, String directory); static String buildSingleVolumePath(int volumeCount, String directory); static String buildSingleVolumePath(int volumeIndex, int volumeCount, String directory); static String getLogVolume(String directory); static String buildVolumePathFromVolumeIndexZeroVolumeHandled(int startIndex, int volumeCount, String directory); static long convertGBToBytes(int sizeInGb); static final String VOLUME_PREFIX; static final String ROOT_VOLUME_PREFIX; }### Answer:
@Test public void buildSingleVolumePathWithZeroDisk() { assertEquals("/hadoopfs/root1/test", buildSingleVolumePath(0, "test")); }
@Test public void buildSingleVolumePathWithOneDisk() { assertEquals("/hadoopfs/fs1/test", buildSingleVolumePath(1, "test")); }
@Test public void buildSingleVolumePathWithManyDisks() { assertEquals("/hadoopfs/fs1/test", buildSingleVolumePath(3, "test")); }
@Test public void testBuildSingleVolumePathWithVolumeId() { assertEquals("/hadoopfs/fs5/test", buildSingleVolumePath(5, 10, "test")); }
@Test public void testBuildSingleVolumePathWithVolumeIdWhenThereAreNotEnoughVolumes() { assertEquals("/hadoopfs/fs3/test", buildSingleVolumePath(5, 3, "test")); }
@Test public void testBuildSingleVolumePathWithVolumeIdWhenThereAreNoVolumes() { assertEquals("/hadoopfs/root1/test", buildSingleVolumePath(5, 0, "test")); }