### Question:
UIServlet extends HttpServlet { static int getZoomLevel(String zoomStr) { if (zoomStr == null) { return DEFAULT_ZOOM_LEVEL_MINUTES; } else { int zoom = Integer.parseInt(zoomStr); if (zoom < MIN_ZOOM_LEVEL_MINUTES) { return MIN_ZOOM_LEVEL_MINUTES; } else if (zoom > MAX_ZOOM_LEVEL_MINUTES) { return MAX_ZOOM_LEVEL_MINUTES; } else { return zoom; } } }    }### Answer:
@Test public void testZoomLevelParam() { Assert.assertEquals(UIServlet.DEFAULT_ZOOM_LEVEL_MINUTES, UIServlet.getZoomLevel(null)); Assert.assertEquals(12, UIServlet.getZoomLevel("12")); Assert.assertEquals(UIServlet.MAX_ZOOM_LEVEL_MINUTES, UIServlet.getZoomLevel("1000000")); Assert.assertEquals(UIServlet.MIN_ZOOM_LEVEL_MINUTES, UIServlet.getZoomLevel("-1")); }