assertEquals("onelevel", javaFile.getParent().getKey());
assertEquals("onelevel", javaFile.getParent().getName());
assertThat((javaFile.getParent()).isDefault(), is(false));
}
@Test
<BUG>public void shouldResolveClassFromAbsolutePath() throws IOException {
List<File> sources = Arrays.asList(newDir("source1"), newDir("source2"));

JavaFile javaFile = JavaFile.fromAbsolutePath(absPath("source2/foo/bar/MyFile.java"), sources, false);
</BUG>
assertThat("foo.bar.MyFile", is(javaFile.getKey()));

assertEquals("onelevel", javaFile.getParent().getKey());
assertEquals("onelevel", javaFile.getParent().getName());
assertThat((javaFile.getParent()).isDefault(), is(false));
}
@Test
public void shouldResolveClassFromAbsolutePath() throws IOException {
File sources1 = newDir("source1");
File sources2 = newDir("source2");
List<File> sources = Arrays.asList(sources1, sources2);
JavaFile javaFile = JavaFile.fromAbsolutePath(absPath(sources2, "foo/bar/MyFile.java"), sources, false);
assertThat("foo.bar.MyFile", is(javaFile.getKey()));
