package com.yahoo.vespa.hosted.controller.restapi.user;

import com.yahoo.vespa.hosted.controller.restapi.ContainerControllerTester;
import com.yahoo.vespa.hosted.controller.restapi.ControllerContainerTest;
import org.junit.Test;

/**
 * @author jonmv
 */
public class UserApiTest extends ControllerContainerTest {

    private static final String responseFiles = "src/test/java/com/yahoo/vespa/hosted/controller/restapi/user/responses/";

    @Test
    public void testUserApi() {
        ContainerControllerTester tester = new ContainerControllerTester(container, responseFiles);

        tester.assertResponse(authenticatedRequest("http://localhost:8080/user/v1/"),
                              "{\n  \"code\" : 403,\n  \"message\" : \"Access denied\"\n" + "}", 403);
    }

}

@@ -699,75 +699,90 @@
  %22%7B%5C
-n  %5C%22code%5C%22 : 403,%5Cn  %5C%22message%5C%22 : %5C%22Access denied%5C%22%5Cn%22 + 
+%22error-code%5C%22:%5C%22NOT_FOUND%5C%22,%5C%22message%5C%22:%5C%22No 'GET' handler at '/user/v1/'%5C
 %22%7D%22, 40
-3
+4
 );%0A 

Update test for user API