SqlSession session = getMyBatis().openSession(false);
try {
ComponentDto newProject = session.getMapper(ComponentMapper.class).selectByKey("foo");
ComponentDto newDir = session.getMapper(ComponentMapper.class).selectByKey("foo:src/main/java/org/foo");
assertThat(newDir.uuid()).isNotNull();
assertThat(newDir.projectUuid()).isEqualTo(newProject.uuid());
assertThat(newDir.moduleUuid()).isEqualTo(newProject.uuid());
assertThat(newDir.moduleUuidPath()).isEqualTo(newProject.uuid());
} finally {
MyBatis.closeQuietly(session);
}