@Test public void testConvertToGBWhenOneDecimal() { String actual = ConversionUtil.convertToGB("1126.4"); Assert.assertEquals("1.1", actual); }
public static String convertToGB(String sizeInMB) { float size = Float.parseFloat(sizeInMB); DecimalFormat formatter = new DecimalFormat("#0.0####"); return formatter.format(size / SHIFT_NUMBER); }
ConversionUtil { public static String convertToGB(String sizeInMB) { float size = Float.parseFloat(sizeInMB); DecimalFormat formatter = new DecimalFormat("#0.0####"); return formatter.format(size / SHIFT_NUMBER); } }
ConversionUtil { public static String convertToGB(String sizeInMB) { float size = Float.parseFloat(sizeInMB); DecimalFormat formatter = new DecimalFormat("#0.0####"); return formatter.format(size / SHIFT_NUMBER); } private  ConversionUtil(); }
ConversionUtil { public static String convertToGB(String sizeInMB) { float size = Float.parseFloat(sizeInMB); DecimalFormat formatter = new DecimalFormat("#0.0####"); return formatter.format(size / SHIFT_NUMBER); } private  ConversionUtil(); static String convertToGB(String sizeInMB); }
ConversionUtil { public static String convertToGB(String sizeInMB) { float size = Float.parseFloat(sizeInMB); DecimalFormat formatter = new DecimalFormat("#0.0####"); return formatter.format(size / SHIFT_NUMBER); } private  ConversionUtil(); static String convertToGB(String sizeInMB); static final int SHIFT_NUMBER; }