@Test
public void cyclicDependencies() {

    PluginDescriptor pd1 = new DefaultPluginDescriptor()
        .setPluginId("p1")
        .setPluginVersion("0.0.0")
        .setDependencies("p2");
    PluginDescriptor pd2 = new DefaultPluginDescriptor()
        .setPluginId("p2")
        .setPluginVersion("0.0.0")
        .setDependencies("p3");
    PluginDescriptor pd3 = new DefaultPluginDescriptor()
        .setPluginId("p3")
        .setPluginVersion("0.0.0")
        .setDependencies("p1");
    List<PluginDescriptor> plugins = new ArrayList<>();
    plugins.add(pd1);
    plugins.add(pd2);
    plugins.add(pd3);
    DependencyResolver.Result result = resolver.resolve(plugins);
    assertTrue(result.hasCyclicDependency());
}