FileSize implements Comparable<FileSize> { public long getMultiplier(char multiplierChar) { long multiplier = 1; multiplierChar = Character.toLowerCase(multiplierChar); switch (multiplierChar) { case 't': multiplier = multiplier * 1024; case 'g': multiplier = multiplier * 1024; case 'm': multiplier = multiplier * 1024; case 'k': multiplier = multiplier * 1024; break; } return multiplier; } FileSize(String string);  FileSize(long bytes); long getBytes(); void setBytes(long bytes); @Override String toString(); long getMultiplier(char multiplierChar); static String convertToStringRepresentation(final long value); @Override int compareTo(FileSize o); @Override boolean equals(Object o); @Override int hashCode();  }
@Test (dataProvider = "testGetMultiplier") public void testGetMultiplier(char c, long multiplier) throws Exception { FileSize fs = new FileSize(1); Assert.assertEquals(fs.getMultiplier(c), multiplier); }