### Question:
ControllerUtils { public static boolean isMobileDevice(HttpServletRequest request) { return DeviceUtils.getCurrentDevice(request).isMobile(); }  static boolean isMobileDevice(HttpServletRequest request); static String getDeviceAppropriateView(HttpServletRequest request, String defaultView, String mobileView); static void addNavItemsToModel(String view, Model model, String referringPageId, User user); static void addNavItemsToModel(String view, Model model, String referringPageId, User user, boolean addStore); static NavigationMenu getTopMenu(String view, String referringPageId, User user, boolean addStoreLink); static String getDisplayName(User user);  }### Answer:
@Test public void testIsMobileDevice_mobileClient() { MockHttpUtil.setupRequestAsMobileUserAgent(request); assertThat(ControllerUtils.isMobileDevice(request), is(true)); }
@Test public void testIsMobileDevice_nonMobileClient() { MockHttpUtil.setupRequestAsNonMobileUserAgent(request); assertThat(ControllerUtils.isMobileDevice(request), is(false)); }