@@ -0,0 +1,2376 @@
+// 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.servlets;%0A%0Aimport com.google.sps.classes.DSACampaign;%0Aimport com.google.appengine.api.datastore.DatastoreService;%0Aimport com.google.appengine.api.datastore.DatastoreServiceFactory;%0Aimport com.google.appengine.api.datastore.Entity;%0Aimport com.google.appengine.api.datastore.Query;%0Aimport org.junit.Assert;%0Aimport org.junit.After;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0Aimport org.junit.runners.JUnit4;%0Aimport static com.google.appengine.api.datastore.FetchOptions.Builder.withLimit;%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.mockito.Mockito.when;%0Aimport java.io.IOException;%0Aimport java.io.PrintWriter;%0Aimport java.io.StringWriter;%0Aimport javax.servlet.ServletException;%0Aimport javax.servlet.http.HttpServletRequest;%0Aimport javax.servlet.http.HttpServletResponse;%0Aimport org.mockito.Mock;%0Aimport org.mockito.MockitoAnnotations;%0Aimport com.google.appengine.tools.development.testing.LocalDatastoreServiceTestConfig;%0Aimport com.google.appengine.tools.development.testing.LocalServiceTestHelper;%0A%0A/*%0A * Tests the doGet() and doPost() functions in DSACampaignsServlet.java.%0A */%0A@RunWith(JUnit4.class)%0Apublic final class PresetServletTest %7B%0A  %0A  @Mock%0A  HttpServletRequest request;%0A%0A  @Mock%0A  HttpServletResponse response;%0A  %0A  private final LocalServiceTestHelper helper = new LocalServiceTestHelper(new LocalDatastoreServiceTestConfig());%0A%0A  @Before%0A  public void setUp() throws Exception %7B%0A    MockitoAnnotations.initMocks(this);%0A    helper.setUp();%0A  %7D%0A%0A  @After%0A  public void tearDown() %7B%0A    helper.tearDown();%0A  %7D%0A%0A  @Test%0A  public void PresetServletDoGetTest() throws IOException, ServletException %7B%0A%0A  %7D%0A%0A  @Test%0A  public void PresetServletdoPostTest() throws IOException, ServletException %7B%0A%0A  %7D%0A%7D

Add preset GET and POST tests (Not implemented)