DefaultUserResourcesProvider implements DefaultResourcesProvider { @Override public List<ResourceImpl> getResources(String accountId) throws ServerException, NotFoundException { return asList( new ResourceImpl(TimeoutResourceType.ID, timeout, TimeoutResourceType.UNIT), new ResourceImpl(RamResourceType.ID, ramPerUser, RamResourceType.UNIT), new ResourceImpl(WorkspaceResourceType.ID, workspacesPerUser, WorkspaceResourceType.UNIT), new ResourceImpl(RuntimeResourceType.ID, runtimesPerUser, RuntimeResourceType.UNIT)); } @Inject  DefaultUserResourcesProvider(
      @Named("che.limits.workspace.idle.timeout") long timeout,
      @Named("che.limits.user.workspaces.ram") String ramPerUser,
      @Named("che.limits.user.workspaces.count") int workspacesPerUser,
      @Named("che.limits.user.workspaces.run.count") int runtimesPerUser); @Override String getAccountType(); @Override List<ResourceImpl> getResources(String accountId);  }
@Test public void shouldProvideDefaultRamResourceForUser() throws Exception { final List<ResourceImpl> defaultResources = resourcesProvider.getResources("user123"); assertEquals(defaultResources.size(), 4); assertTrue( defaultResources.contains( new ResourceImpl(RamResourceType.ID, 2048, RamResourceType.UNIT))); assertTrue( defaultResources.contains( new ResourceImpl(WorkspaceResourceType.ID, 10, WorkspaceResourceType.UNIT))); assertTrue( defaultResources.contains( new ResourceImpl(RuntimeResourceType.ID, 5, RuntimeResourceType.UNIT))); assertTrue( defaultResources.contains( new ResourceImpl(TimeoutResourceType.ID, 20, TimeoutResourceType.UNIT))); }