### Question:
SurenessCommonUtil { public static String findUserAgent(HttpServletRequest request) { String userAgent = request.getHeader(USER_AGENT); return findUserAgent(userAgent); }  static String findUserAgent(HttpServletRequest request); static String findUserAgent(ContainerRequestContext request); static String findUserAgent(String userAgent); static String getRandomString(int length);  }### Answer:
@Test public void findUserAgent() { HttpServletRequest request = createNiceMock(HttpServletRequest.class); expect(request.getHeader(USER_AGENT)).andReturn(LINUX).anyTimes(); replay(request); assertEquals(LINUX, SurenessCommonUtil.findUserAgent(request)); assertNotNull(SurenessCommonUtil.findUserAgent(request)); verify(request); }