@Test
    void list_applications_returns_the_correct_list_of_suspended_applications() {
        // Test that initially we have the empty set
        HttpResponse httpResponse = executeRequest(Method.GET, "", null);
        assertEquals(200, httpResponse.getStatus());
        Set<String> set = parseResponseContent(httpResponse, new TypeReference<>() {});
        assertEquals(0, set.size());

        // Add a couple of applications to maintenance
        executeRequest(Method.POST, "", RESOURCE_1);
        executeRequest(Method.POST, "", RESOURCE_2);

        // Test that we get them back
        httpResponse = executeRequest(Method.GET, "", null);
        assertEquals(200, httpResponse.getStatus());
        set = parseResponseContent(httpResponse, new TypeReference<>() {});
        assertEquals(2, set.size());

        // Remove suspend for the first resource
        executeRequest(Method.DELETE, "/"+RESOURCE_1, null);

        // Test that we are back to the start with the empty set
        httpResponse = executeRequest(Method.GET, "", null);
        assertEquals(200, httpResponse.getStatus());
        set = parseResponseContent(httpResponse, new TypeReference<>() {});
        assertEquals(1, set.size());
        assertEquals(RESOURCE_2, set.iterator().next());
    }
Tests the implementation of the orchestrator Application API.

@author smorgrav
@author bjorncs
orchestrator/src/test/java/com/yahoo/vespa/orchestrator/resources/ApplicationSuspensionRequestHandlerTest.java