class Sonar {

    public Project findProject(String projectKey) throws SonarProjectNotFoundException {
        Preconditions.checkNotNull(projectKey, "projectKey is mandatory");
        try {
            List<Project> projects = findProjects().getProjects();
            for (Project project : projects) {
                if (project.getKey().equals(projectKey)) {
                    return project;
                }
            }
            throw new SonarProjectNotFoundException("Can't find Sonar project with resourceId: '" + projectKey + "'");
        } catch (SonarProjectsNotFoundException e) {
            throw new SonarProjectNotFoundException("Can't find Sonar project with resourceId: '" + projectKey + "'",
                    e);
        }
    }

    public  Sonar(String url);
    public  Sonar(String url, String login, String password);

}