### Question:
SingleSinaFansAnalysis { public String fansQuality(WritableComparable<?> querykey) throws IOException, NumberFormatException, SQLException { int[] quality = new int[3]; reader.get(querykey, value); if (value == null) { return "Nan"; } computeQuality(quality, value); while (reader.next(key, value)) { if (key.toString().equals(querykey.toString())) { computeQuality(quality, value); } else { break; } } int sum = quality[0] + quality[1] + quality[2]; if (sum == 0) { return "Nan"; } return Math.round(((float) (quality[1] + quality[2]) / sum) * 10000) / 100 + "%" + "," + Math.round(((float) quality[2] / sum) * 10000) / 100 + "%"; } SingleSinaFansAnalysis(); void close(); static void main(String[] args); String fansQuality(WritableComparable<?> querykey); List<Long> findAllValuesByKey(WritableComparable<?> querykey);  }### Answer:
@Test public void testFansQuality() { int[] quality = { 11, 22, 33 }; int sum = quality[0] + quality[1] + quality[2]; String result = (float) (quality[1] + quality[2]) / sum + ""; result = result + "," + (float) quality[2] / sum; System.out.println(result); assertThat(result, is("0.8333333,0.5")); }