@Test
public void testGetParent() {

  // Construct the dependency trail as provided by Artifact.getDependencyTrail()
  final List<String> trail = new ArrayList<String>();
  trail.add("commons-fileupload:commons-fileupload:jar:1.2.1");
  trail.add("commons-codec:commons-codec:jar:1.2.1");
  trail.add("commons-lang:commons-lang:jar:1.2.1");
  final MvnPluginReport m = new MvnPluginReport();
  final LibraryId parent = m.getParent(trail);
  assertEquals(new LibraryId("commons-codec", "commons-codec", "1.2.1"), parent);
}