@Test
  public void shouldReturnUnparsableClassIfClassCannotBeFound() {
    JavaClass javaClass = builder.createClass("foo.bar.com");

    assertThat(javaClass).isInstanceOf(UnparsableClass.class);
    assertThat(javaClass.getName()).isEqualTo("foo.bar.com");
    assertThat(javaClass.getImports()).isEmpty();
  }
 private void updateParentReferences(JavaClass parentClass) {
   for (String child : parentClass.getImports()) {
     JavaClass childClass = findJavaClass(child);
     if ((childClass != null) && !childClass.equals(parentClass)) {
       if (graph.containsVertex(childClass)) {
         graph.addEdge(parentClass, childClass);
       }
     }
   }
 }
  @Test
  public void shouldFindDependenciesInSamePackage() {
    JavaClass javaClass = builder.createClass(FakeTree.class.getName());

    assertThat(javaClass.getImports()).contains(FakeDependency.class.getName());
  }