Exemplo n.º 1
0
 @Test
 public void testGetVersionList() throws RepositoryException {
   final String pid = "FedoraVersioningTest";
   when(mockRequest.selectVariant(POSSIBLE_RDF_VARIANTS)).thenReturn(mockVariant);
   when(mockNodes.getObject(any(Session.class), anyString())).thenReturn(mockResource);
   when(mockResource.getVersionTriples(any(HttpIdentifierTranslator.class)))
       .thenReturn(mockRdfStream);
   when(mockVariant.getMediaType()).thenReturn(new MediaType("text", "turtle"));
   final RdfStream response =
       testObj.getVersionList(createPathList(pid), mockRequest, getUriInfoImpl());
   assertEquals("Got wrong RdfStream!", mockRdfStream, response);
 }