package com.proofpoint.sample;

import com.google.inject.Inject;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;

@Path("/v1/person")
public class PersonsResource
{
    private final PersonStore store;

    @Inject
    public PersonsResource(PersonStore store)
    {
        this.store = store;
    }

    @GET
    @Produces(MediaType.APPLICATION_JSON)
    public Response listAll()
    {
        return Response.ok(store.getAll()).build();
    }
}

@@ -25,16 +25,61 @@
 ample;%0A%0A
+import com.google.common.base.Preconditions;%0A
 import c
@@ -397,32 +397,102 @@
 re store)%0A    %7B%0A
+        Preconditions.checkNotNull(store, %22store must not be null%22);%0A%0A
         this.sto

add precondition checks