D2.organisationUnit().list().subscribe(new Action1<List<OrganisationUnit>>() {
    @Override
    public void call(List<OrganisationUnit> organisationUnits) {

        if(organisationUnits == null)
        {
            System.err.println("organisationUnits null");
            return;
        }

        for(OrganisationUnit organisationUnit : organisationUnits)
        {
            orgString += organisationUnit.getDisplayName();
        }

        System.err.println("orgString "+orgString);
    }
}, new Action1<Throwable>() {
    @Override
    public void call(Throwable e) {
        System.err.println("error "+e.getMessage());
    }
});