### Question:
QuotaUtil { public static int getUsedRatioInPercent(QuotaState q) { if (q.getSize() == q.getQuota()) { return 0; } return (int) (q.getSize() / (double) q.getQuota() * 100); }  static String getQuotaDescription(QuotaState q, String quotaDescriptionPattern); static int getUsedRatioInPercent(QuotaState q);  }### Answer:
@Test public void ratioWithNoFreeSpace() { int usedRatio = getUsedRatioInPercent(noSpaceQuota); assertEquals(0, usedRatio); }
@Test public void ratioWithFreeSpace() { int usedRatio = getUsedRatioInPercent(qs10Free); assertEquals(10, usedRatio); }