### Question:
ResourceAvailabilityUtil { public static boolean isMemoryAvailable(float minPercentageAvailable) { final Runtime runtime = Runtime.getRuntime(); long freeMemory = runtime.freeMemory(); long totalMemory = runtime.totalMemory(); return ((((double) freeMemory / (double) totalMemory))) >= minPercentageAvailable; }  static boolean isMemoryAvailable(float minPercentageAvailable); static boolean isDiskAvailable(float minPercentageAvailable); static boolean isDiskAvailable(final String path, float minPercentageAvailable); static final String ROOT_PATH; }### Answer:
@Test public void testIsMemoryAvailable_DefaultPath() { float reasonableMinAvailability = 0.0f; float unreasonableMinAvailability = 1.01f; boolean result1 = ResourceAvailabilityUtil.isMemoryAvailable(reasonableMinAvailability); boolean result2 = ResourceAvailabilityUtil.isMemoryAvailable(unreasonableMinAvailability); assertTrue(reasonableMinAvailability + "% minimum memory should always be available", result1); assertTrue(unreasonableMinAvailability + "% minimum memory should never be available", !result2); }