OrganizationResourcesDistributor { public List<? extends Resource> getResourcesCaps(String suborganizationId) throws NotFoundException, ConflictException, ServerException { requireNonNull(suborganizationId, "Required non-null suborganization id"); checkIsSuborganization(suborganizationId); try { return organizationDistributedResourcesDao.get(suborganizationId).getResourcesCap(); } catch (NotFoundException e) { return emptyList(); } } @Inject  OrganizationResourcesDistributor(
      OrganizationDistributedResourcesDao organizationDistributedResourcesDao,
      OrganizationManager organizationManager,
      ResourcesLocks resourcesLocks,
      ResourceManager resourceManager,
      ResourceAggregator resourceAggregator); @Inject void subscribe(EventService eventService); void capResources(String suborganizationId, List<? extends Resource> resourcesCaps); List<? extends Resource> getResourcesCaps(String suborganizationId); OrganizationDistributedResources get(String suborganizationId); Page<? extends OrganizationDistributedResources> getByParent(
      String organizationId, int maxItems, long skipCount);  }
@Test(expectedExceptions = NullPointerException.class) public void shouldThrowNpeOnGettingResourcesCapByNullOrganizationId() throws Exception { manager.getResourcesCaps(null); }