@Test
public void should_find_all_software_project_ids() throws Exception {

    Project project1 = new Project();
    project1.setName("name1");
    project1.setKey("key1");
    Project project2 = new Project();
    project2.setName("name2");
    project2.setKey("key2");
    Projects projects = new Projects();
    projects.getProjects().add(project1);
    projects.getProjects().add(project2);
    when(sonarClient.findProjects()).thenReturn(projects);
    Map<SoftwareProjectId, String> softwareProjectIds = sonar.listSoftwareProjectIds();
    assertEquals("name1", softwareProjectIds.get(new SoftwareProjectId("key1")));
    assertEquals("name2", softwareProjectIds.get(new SoftwareProjectId("key2")));
}