@@ -0,0 +1,2939 @@
+package com.google.sps.utilities;%0A%0Aimport com.google.cloud.Date;%0Aimport com.google.cloud.spanner.Database;%0Aimport com.google.cloud.spanner.Mutation;%0Aimport com.google.cloud.spanner.ResultSet;%0Aimport com.google.cloud.spanner.Statement;%0Aimport com.google.sps.data.Event;%0Aimport com.google.sps.data.User;%0Aimport com.google.sps.data.VolunteeringOpportunity;%0Aimport java.util.Arrays;%0Aimport java.util.ArrayList;%0Aimport java.util.HashSet;%0Aimport java.util.List;%0Aimport java.util.Optional;%0Aimport java.util.Set;%0Aimport java.util.concurrent.ExecutionException;%0Aimport java.util.stream.Collectors;%0A%0A/** Class containing methods for interaction with database for tests. */%0Apublic class SpannerTestTasks %7B      %0A  public static void setup() throws InterruptedException, ExecutionException %7B%0A    Iterable%3CString%3E statements =%0A        Arrays.asList(%22CREATE TABLE Users (%22%0A                + %22  Name                 STRING(MAX) NOT NULL,%22%0A                + %22  Email                STRING(MAX) NOT NULL,%22%0A                + %22  Interests            ARRAY%3CSTRING(MAX)%3E,%22%0A                + %22  Skills               ARRAY%3CSTRING(MAX)%3E,%22%0A                + %22  EventsHosting        ARRAY%3CSTRING(MAX)%3E,%22%0A                + %22  EventsParticipating  ARRAY%3CSTRING(MAX)%3E,%22%0A                + %22  EventsVolunteering   ARRAY%3CSTRING(MAX)%3E%22%0A                + %22) PRIMARY KEY (Email)%22,%0A            %22CREATE TABLE Events (%22%0A                + %22  EventID        STRING(MAX) NOT NULL,%22%0A                + %22  Name           STRING(MAX) NOT NULL,%22%0A                + %22  Description    STRING(MAX),%22%0A                + %22  Date           DATE,%22%0A                + %22  Location       STRING(MAX),%22%0A                + %22  Attendees      ARRAY%3CSTRING(MAX)%3E,%22%0A                + %22  Host           STRING(MAX),%22%0A                + %22  Labels         ARRAY%3CSTRING(MAX)%3E,%22%0A                + %22  Opportunities  ARRAY%3CSTRING(MAX)%3E%22%0A                + %22) PRIMARY KEY (EventID)%22,%0A            %22CREATE TABLE VolunteeringOpportunity (%22%0A                + %22  VolunteeringOpportunityID  STRING(MAX) NOT NULL,%22%0A                + %22  EventID  STRING(MAX) NOT NULL,%22%0A                + %22  Name                       STRING(MAX) NOT NULL,%22%0A                + %22  NumSpotsLeft               INT64 NOT NULL,%22%0A                + %22  RequiredSkills             ARRAY%3CSTRING(MAX)%3E,%22%0A                + %22  Volunteers                 ARRAY%3CSTRING(MAX)%3E%22%0A                + %22) PRIMARY KEY (VolunteeringOpportunityID)%22);%0A    System.out.println(SpannerClient.getDatabaseClient());%0A    System.out.println(SpannerClient.getDatabaseAdminClient());%0A    Database db =%0A        SpannerClient.getDatabaseAdminClient()%0A            .createDatabase(%0A                SpannerClient.getInstanceId(), SpannerClient.getDatabaseId(), statements)%0A            .get();%0A  %7D%0A%0A  /* Drops the database */%0A  public static void cleanup() %7B%0A    SpannerClient.getDatabaseAdminClient().dropDatabase(SpannerClient.getInstanceId(), SpannerClient.getDatabaseId());%0A  %7D%0A%7D%0A

Add static utility class.