@@ -0,0 +1,2933 @@
+package com.google.sps.servlets;%0A%0Aimport static org.junit.Assert.assertTrue;%0Aimport static org.mockito.Mockito.when;%0A%0Aimport com.google.appengine.api.datastore.DatastoreService;%0Aimport com.google.appengine.api.datastore.DatastoreServiceFactory;%0Aimport com.google.appengine.api.datastore.EmbeddedEntity;%0Aimport com.google.appengine.api.datastore.Entity;%0Aimport com.google.appengine.api.datastore.KeyFactory;%0Aimport com.google.appengine.tools.development.testing.LocalDatastoreServiceTestConfig;%0Aimport com.google.appengine.tools.development.testing.LocalServiceTestHelper;%0Aimport com.google.gson.Gson;%0Aimport java.io.PrintWriter;%0Aimport java.io.StringWriter;%0Aimport java.util.ArrayList;%0Aimport java.util.Arrays;%0Aimport java.util.Collections;%0Aimport java.util.Date;%0Aimport javax.servlet.http.HttpServletRequest;%0Aimport javax.servlet.http.HttpServletResponse;%0Aimport org.junit.After;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0Aimport org.mockito.InjectMocks;%0Aimport org.mockito.Mock;%0Aimport org.mockito.junit.MockitoJUnitRunner;%0A%0A@RunWith(MockitoJUnitRunner.class)%0Apublic class WaitTimeTest %7B%0A%0A  private final LocalServiceTestHelper helper =%0A      new LocalServiceTestHelper(new LocalDatastoreServiceTestConfig());%0A%0A  private DatastoreService datastore;%0A%0A  @Mock HttpServletRequest httpRequest;%0A%0A  @Mock HttpServletResponse httpResponse;%0A%0A  @InjectMocks WaitTime wait;%0A%0A  @Before%0A  public void setUp() %7B%0A    helper.setUp();%0A    datastore = DatastoreServiceFactory.getDatastoreService();%0A  %7D%0A%0A  @After%0A  public void tearDown() %7B%0A    helper.tearDown();%0A  %7D%0A%0A  @Test%0A  // Get average wait time for a single class, single day%0A  public void basic() throws Exception %7B%0A    Date date1 = new Date(2020, 1, 1);%0A%0A    Entity init = new Entity(%22Class%22);%0A%0A    init.setProperty(%22owner%22, %22ownerID%22);%0A    init.setProperty(%22name%22, %22testClass%22);%0A    init.setProperty(%22beingHelped%22, new EmbeddedEntity());%0A    init.setProperty(%22taList%22, Collections.emptyList());%0A    init.setProperty(%22studentQueue%22, Arrays.asList(%22test1%22, %22test2%22, %22test3%22));%0A%0A    datastore.put(init);%0A%0A    // Create a test entity in Wait%0A    Entity waitEntity = new Entity(%22Wait%22);%0A    waitEntity.setProperty(%22classKey%22, init.getKey());%0A%0A    ArrayList%3CLong%3E waitDurList = new ArrayList%3CLong%3E(Arrays.asList(10L, 3L, 6L, 1L));%0A%0A    waitEntity.setProperty(%22waitDurations%22, waitDurList);%0A    waitEntity.setProperty(%22date%22, date1);%0A%0A    datastore.put(waitEntity);%0A%0A    when(httpRequest.getParameter(%22classCode%22)).thenReturn(KeyFactory.keyToString(init.getKey()));%0A%0A    StringWriter stringWriter = new StringWriter();%0A    PrintWriter writer = new PrintWriter(stringWriter);%0A%0A    when(httpResponse.getWriter()).thenReturn(writer);%0A%0A    wait.doGet(httpRequest, httpResponse); // Servlet response%0A%0A    Gson gson = new Gson();%0A%0A    assertTrue(stringWriter.toString().contains(gson.toJson(date1)));%0A    assertTrue(stringWriter.toString().contains(%225%22));%0A  %7D%0A%7D%0A

Add basic wait test.