@@ -0,0 +1,2032 @@
+package com.coding4people.mosquitoreport.api.controllers;%0D%0A%0D%0Aimport static org.junit.Assert.assertEquals;%0D%0A%0D%0Aimport javax.ws.rs.core.Response;%0D%0A%0D%0Aimport org.glassfish.jersey.server.ResourceConfig;%0D%0Aimport org.junit.Test;%0D%0Aimport org.mockito.Mock;%0D%0A%0D%0Aimport com.coding4people.mosquitoreport.api.WithServer;%0D%0Aimport com.coding4people.mosquitoreport.api.models.User;%0D%0Aimport com.coding4people.mosquitoreport.api.repositories.UserRepository;%0D%0A%0D%0Apublic class ProfileControllerTest extends WithServer %7B%0D%0A    @Mock%0D%0A    UserRepository userRepository;%0D%0A%0D%0A    User currentUser = new User();;%0D%0A%0D%0A    @Override%0D%0A    protected ResourceConfig configure() %7B%0D%0A        return super.configure().register(ProfileController.class);%0D%0A    %7D%0D%0A    %0D%0A    @Override%0D%0A    protected User getCurrentUser() %7B%0D%0A        return currentUser;%0D%0A    %7D%0D%0A%0D%0A    @Test%0D%0A    public void testGet() %7B%0D%0A        currentUser.setGuid(%22my guid%22);%0D%0A        currentUser.setEmail(%22my email%22);%0D%0A        currentUser.setFirstname(%22my firstname%22);%0D%0A        currentUser.setLastname(%22my lastname%22);%0D%0A        currentUser.setLocation(%22my location%22);%0D%0A        currentUser.setFacebookurl(%22my facebookurl%22);%0D%0A        currentUser.setTwitter(%22my twitter%22);%0D%0A        currentUser.setProfilepictureguid(%22my profilepictureguid%22);%0D%0A%0D%0A        Response response = target().path(%22/profile%22).request().get();%0D%0A%0D%0A        assertEquals(200, response.getStatus());%0D%0A        assertEquals(%22application/json;charset=UTF-8%22, response.getHeaderString(%22Content-type%22));%0D%0A%0D%0A        User user = response.readEntity(User.class);%0D%0A%0D%0A        assertEquals(%22my guid%22, user.getGuid());%0D%0A        assertEquals(%22my email%22, user.getEmail());%0D%0A        assertEquals(%22my firstname%22, user.getFirstname());%0D%0A        assertEquals(%22my lastname%22, user.getLastname());%0D%0A        assertEquals(%22my location%22, user.getLocation());%0D%0A        assertEquals(%22my facebookurl%22, user.getFacebookurl());%0D%0A        assertEquals(%22my twitter%22, user.getTwitter());%0D%0A        assertEquals(%22my profilepictureguid%22, user.getProfilepictureguid());%0D%0A    %7D%0D%0A%7D%0D%0A

Test get profile