@Test
  public void testLookup() throws ArtifactDescriptorException {
    StubArtifact art = new StubArtifact("gid:aid:ext:ver");
    ArtifactDescriptorRequest request = new ArtifactDescriptorRequest(art, null, "");
    ArtifactDescriptorResult description = reader.readArtifactDescriptor(session, request);

    assertEquals(request, description.getRequest());
    assertEquals(art, description.getArtifact());

    assertEquals(1, description.getRelocations().size());
    Artifact artifact = description.getRelocations().get(0);
    assertEquals("gid", artifact.getGroupId());
    assertEquals("aid", artifact.getArtifactId());
    assertEquals("ver", artifact.getVersion());
    assertEquals("ext", artifact.getExtension());

    assertEquals(1, description.getRepositories().size());
    RemoteRepository repo = description.getRepositories().get(0);
    assertEquals("id", repo.getId());
    assertEquals("type", repo.getContentType());
    assertEquals("protocol://some/url?for=testing", repo.getUrl());

    assertDependencies(description.getDependencies());
    assertDependencies(description.getManagedDependencies());
  }
 @Test(expected = ArtifactDescriptorException.class)
 public void testMissingDescriptor() throws ArtifactDescriptorException {
   StubArtifact art = new StubArtifact("missing:aid:ver:ext");
   ArtifactDescriptorRequest request = new ArtifactDescriptorRequest(art, null, "");
   reader.readArtifactDescriptor(session, request);
 }