uri-resolver/src/test/java/DetachedVREs.java

34 lines
921 B
Java
Raw Normal View History

2020-06-08 17:18:13 +02:00
import java.util.concurrent.ExecutionException;
import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
import org.gcube.datatransfer.resolver.caches.LoadingMapOfDetachedVRE;
import org.gcube.infrastructure.detachedres.detachedreslibrary.shared.re.VRE;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class DetachedVREs {
public static Logger LOG = LoggerFactory.getLogger(DetachedVREs.class);
public static String TOKEN = "0e2c7963-8d3e-4ea6-a56d-ffda530dd0fa-98187548";
/**
* Storage hub test.
*
* @throws Exception the exception
*/
@Test
public void testCacheOfDetachedVREs() throws Exception{
try {
SecurityTokenProvider.instance.set(TOKEN);
VRE theDetachedVRE = LoadingMapOfDetachedVRE.get("NextNext");
LOG.info("Detached VRE found {}", theDetachedVRE);
}catch (ExecutionException e) {
e.printStackTrace();
}
}
}