@@ -0,0 +1,2159 @@
+// Copyright 2019 Google LLC%0A//%0A// Licensed under the Apache License, Version 2.0 (the %22License%22);%0A// you may not use this file except in compliance with the License.%0A// You may obtain a copy of the License at%0A//%0A//     https://www.apache.org/licenses/LICENSE-2.0%0A//%0A// Unless required by applicable law or agreed to in writing, software%0A// distributed under the License is distributed on an %22AS IS%22 BASIS,%0A// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A// See the License for the specific language governing permissions and%0A// limitations under the License.%0A%0Apackage com.google.sps;%0A%0Aimport java.util.List;%0Aimport java.util.Arrays;%0Aimport java.io.StringWriter;%0Aimport java.io.PrintWriter;%0Aimport org.junit.Assert;%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0Aimport org.junit.runners.JUnit4;%0Aimport static org.mockito.Mockito.*;%0Aimport com.google.sps.servlets.ConfirmationServlet;%0Aimport com.google.gson.Gson;%0Aimport javax.servlet.http.HttpServlet;%0Aimport javax.servlet.http.HttpServletRequest;%0Aimport javax.servlet.http.HttpServletResponse;%0Aimport javax.servlet.*;%0A%0A@RunWith(JUnit4.class)%0Apublic final class ConfirmationTest %7B%0A%0A    @Test%0A    public void testDoPost() throws Exception %7B%0A        HttpServletRequest request = mock(HttpServletRequest.class);       %0A        HttpServletResponse response = mock(HttpServletResponse.class);%0A        ServletConfig config = mock(ServletConfig.class);    %0A%0A        when(request.getParameter(%22tutorID%22)).thenReturn(%22elian@google.com%22);%0A%0A        StringWriter stringWriter = new StringWriter();%0A        PrintWriter writer = new PrintWriter(stringWriter);%0A        when(response.getWriter()).thenReturn(writer);%0A        when(request.getContentType()).thenReturn(%22application/json%22);%0A%0A        ConfirmationServlet servlet = new ConfirmationServlet();%0A        servlet.init(config);%0A        servlet.doPost(request, response);%0A%0A        verify(request, atLeast(1)).getParameter(%22tutorID%22);%0A        writer.flush();%0A        // If the user has no scheduled sessions, the return json string should be an empty array%0A        Assert.assertTrue(stringWriter.toString().contains(%22%5B%5D%22));%0A    %7D%0A%0A%7D%0A

Add java tests to confirmation servlet.