|
|
|
@ -1,36 +1,24 @@
|
|
|
|
|
package org.gcube.resourcemanagement.manager.webapp.context;
|
|
|
|
|
|
|
|
|
|
import static org.junit.Assert.*;
|
|
|
|
|
import static org.junit.Assert.assertEquals;
|
|
|
|
|
import static org.junit.Assert.assertNotNull;
|
|
|
|
|
|
|
|
|
|
import java.io.IOException;
|
|
|
|
|
import java.io.InputStream;
|
|
|
|
|
import java.util.Properties;
|
|
|
|
|
import java.util.UUID;
|
|
|
|
|
|
|
|
|
|
import javax.ws.rs.client.Entity;
|
|
|
|
|
import javax.ws.rs.core.Application;
|
|
|
|
|
import javax.ws.rs.core.MediaType;
|
|
|
|
|
import javax.ws.rs.core.Response;
|
|
|
|
|
import javax.ws.rs.core.Response.Status;
|
|
|
|
|
import javax.ws.rs.core.Response.StatusType;
|
|
|
|
|
|
|
|
|
|
import org.gcube.common.authorization.client.Constants;
|
|
|
|
|
import org.gcube.common.authorization.client.exceptions.ObjectNotFound;
|
|
|
|
|
import org.gcube.common.authorization.library.AuthorizationEntry;
|
|
|
|
|
import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
|
|
|
|
|
import org.gcube.common.gxrest.response.inbound.GXInboundResponse;
|
|
|
|
|
import org.gcube.common.gxrest.response.outbound.CodeFinder;
|
|
|
|
|
import org.gcube.common.gxrest.response.outbound.ErrorCode;
|
|
|
|
|
import org.gcube.common.scope.api.ScopeProvider;
|
|
|
|
|
import org.gcube.informationsystem.impl.entity.ContextImpl;
|
|
|
|
|
import org.gcube.informationsystem.impl.utils.ISMapper;
|
|
|
|
|
import org.gcube.informationsystem.model.entity.Context;
|
|
|
|
|
import org.gcube.informationsystem.resourceregistry.context.ResourceRegistryContextClient;
|
|
|
|
|
import org.gcube.informationsystem.resourceregistry.context.ResourceRegistryContextClientImpl;
|
|
|
|
|
import org.gcube.resourcemanagement.manager.io.rs.RMCreateContextCode;
|
|
|
|
|
import org.gcube.resourcemanagement.manager.io.rs.RMContextDoesNotExistException;
|
|
|
|
|
import org.gcube.resourcemanagement.manager.io.rs.RMContextsAccess;
|
|
|
|
|
import org.gcube.resourcemanagement.manager.webapp.rs.RMContexts;
|
|
|
|
|
import org.gcube.resourcemanagement.manager.webapp.rs.RMTestForGXRest;
|
|
|
|
|
import org.glassfish.jersey.server.ResourceConfig;
|
|
|
|
|
import org.glassfish.jersey.test.JerseyTest;
|
|
|
|
@ -44,8 +32,6 @@ import org.junit.runners.MethodSorters;
|
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
|
|
|
|
|
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Test cases for the Context methods.
|
|
|
|
|
*
|
|
|
|
|