### Question:
UserWebService { @GET @Path("/login") public Response login(@HeaderParam(REFERER) String ref, @QueryParam("logout") @DefaultValue("false") boolean logout, @QueryParam("user") String login) { if (logout) { userService.setCurrentUser(userService.getAnonymousUser()); throw new AccessDeniedException(); } if (userService.isAnonymous(userService.getCurrentUser())) throw new AccessDeniedException(); if (login != null && !userService.getCurrentUser().equals(userService.getUser(login))) throw new AccessDeniedException(); if (ref == null || "".equals(ref)) { ref = configurationService.getServerUri() + configurationService.getStringConfiguration("kiwi.pages.startup"); } return Response.seeOther(java.net.URI.create(ref)).build(); }  @PostConstruct void initialize(); @GET @Path("/me") @Produces(Namespaces.MIME_TYPE_JSON) Response get(); @POST @Path("/me") @Consumes(Namespaces.MIME_TYPE_FORM_URLENC) Response post(MultivaluedMap<String, String> formParams); @POST @Path("/me") Response post(); @POST @Path("/me/passwd") Response passwd(@FormParam("oldPasswd") String oldPwd, @FormParam("newPasswd") String newPwd); Response getUser(@PathParam("login") String login, @HeaderParam("Accept") String types); @GET @Path("/login") Response login(@HeaderParam(REFERER) String ref, @QueryParam("logout") @DefaultValue("false") boolean logout,
                          @QueryParam("user") String login); @GET @Path("/logout") Response logout(@HeaderParam(REFERER) String ref);  }### Answer:
@Test @Ignore("internal jboss issue") public void testLogin() throws IOException, InterruptedException { final ConfigurationService configurationService = marmotta.getService(ConfigurationService.class); final String passwd = configurationService.getStringConfiguration("user.admin.password"); expect(). log().ifError(). statusCode(200). given(). auth(). preemptive().basic("admin", passwd). when(). get("/user/login"); }