@Test
public void shouldResolveComplexDependencies() throws Exception {

    List<Class<?>> plugins = newArrayList(DeepDependencyPlugin.class, DependencyPlugin.class, TestPlugin.class, OptionalPlugin.class, SingleDependencyPlugin.class
    );
    Collection<Node<?>> nodes = sut.resolve(plugins);
    assertEquals(plugins.size(), nodes.size());
    for (Node node : nodes) {
        assertTrue(plugins.contains(node.getRefClass()));
    }
}