@Test
void linkWithService() {

    ListenPortLinker linker = new ListenPortLinker();
    ListenPort port = new ListenPort();
    port.setName("Port");
    port.setTargetServiceReference("Service");
    Service service = new Service();
    service.setId("Service");
    service.setName("Service");
    Folder folder = new Folder();
    folder.setName("folder");
    folder.setId("folder");
    folder.setParentFolder(Folder.ROOT_FOLDER);
    service.setParentFolder(folder);
    FolderTree tree = new FolderTree(ImmutableSet.of(folder, folder.getParentFolder()));
    Bundle bundle = new Bundle();
    bundle.setFolderTree(tree);
    bundle.getServices().put(service.getId(), service);
    bundle.getFolders().put(folder.getId(), folder);
    linker.link(port, bundle, bundle);
    assertNotNull(port.getTargetServiceReference());
    assertEquals("folder/Service", port.getTargetServiceReference());
}