class BambooConnection implements BuildCapability, TestCapability {

    @Override
    public Map<SoftwareProjectId, String> listSoftwareProjectIds() {
        checkConnected();
        Map<SoftwareProjectId, String> projects = new HashMap<SoftwareProjectId, String>();
        List<Plan> plans = bamboo.findAllPlans();
        for (Plan plan : plans) {
            String key = plan.getKey();
            SoftwareProjectId softwareProjectId = new SoftwareProjectId(key);
            projects.put(softwareProjectId, plan.getName());
        }
        return projects;
    }

}