### Question:
BaseService { protected boolean isAdmin(User user) { return user.getUserType() == UserType.ADMIN_USER; }  static Cookie getCookie(HttpServletRequest request, String name);  }### Answer:
@Test public void testIsAdmin(){ User user = new User(); user.setUserType(UserType.ADMIN_USER); boolean isAdmin = baseService.isAdmin(user); Assert.assertTrue(isAdmin); user.setUserType(UserType.GENERAL_USER); isAdmin = baseService.isAdmin(user); Assert.assertFalse(isAdmin); }