@@ -0,0 +1,2033 @@
+package com.google.sps.servlets;%0A%0Aimport org.junit.Assert;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport org.junit.After;%0A%0Aimport org.junit.runner.RunWith;%0Aimport org.junit.runners.JUnit4;%0Aimport static com.google.sps.tool.Tool.compareJson;%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.junit.Assert.assertTrue;%0Aimport static org.mockito.Mockito.*;%0A%0Aimport java.io.PrintWriter;%0Aimport java.io.StringWriter;%0Aimport java.io.IOException;%0A%0Aimport javax.servlet.annotation.WebServlet;%0Aimport javax.servlet.http.HttpServlet;%0Aimport javax.servlet.http.HttpServletRequest;%0Aimport javax.servlet.http.HttpServletResponse;%0A%0Aimport com.google.appengine.tools.development.testing.LocalServiceTestHelper;%0Aimport com.google.appengine.tools.development.testing.LocalBlobstoreServiceTestConfig;%0A%0A%0Apublic final class UploadOnBlobstoreServletTest %7B%0A%0A  private final LocalServiceTestHelper helper = %0A    new LocalServiceTestHelper(new LocalBlobstoreServiceTestConfig());%0A%0A  private String BLOBSTORE_HEADER_URL = %22http://localhost:8080/_ah/upload/%22;%0A  private HttpServletRequest mockRequest;%0A  private HttpServletResponse mockResponse;%0A  private StringWriter responseWriter;%0A  private UploadOnBlobstoreServlet servlet;%0A    %0A  @Before%0A  public void setUp() throws Exception %7B%0A    helper.setUp();%0A    servlet = new UploadOnBlobstoreServlet();%0A    mockRequest = mock(HttpServletRequest.class);%0A    mockResponse = mock(HttpServletResponse.class);%0A    %0A    // Set up a fake HTTP response %0A    responseWriter = new StringWriter();%0A    when(mockResponse.getWriter()).thenReturn(new PrintWriter(responseWriter));%0A  %7D%0A%0A  @After%0A  public void tearDown() throws Exception %7B%0A    helper.tearDown();%0A  %7D%0A%0A  @Test%0A  public void GetBlobstoreUploadUrl() throws Exception %7B%0A    // Note: blobstore url changes during local testing%0A    //       so we're just checking if there is a response%0A    servlet.doGet(mockRequest, mockResponse);%0A    String response = responseWriter.toString();%0A    assertTrue(response.contains(BLOBSTORE_HEADER_URL));%0A  %7D%0A%7D

Implement UploadOnBlobstoreServletTest.java