test_class.declarator: USER_USERNAME = "user@umbrella.com"
test_class.modifier: private static final
test_class.original_string: private static final String USER_USERNAME = "user@umbrella.com";
test_class.type: String
test_class.var_name: USER_USERNAME
test_class.declarator: ADMIN_USERNAME = "admin@umbrella.com"
test_class.modifier: private static final
test_class.original_string: private static final String ADMIN_USERNAME = "admin@umbrella.com";
test_class.type: String
test_class.var_name: ADMIN_USERNAME
test_class.declarator: ROLE_ADMIN = "ADMIN"
test_class.modifier: private static final
test_class.original_string: private static final String ROLE_ADMIN = "ADMIN";
test_class.type: String
test_class.var_name: ROLE_ADMIN
test_class.declarator: ROLE_ORGANIZATION_USER = "ORG_USER"
test_class.modifier: private static final
test_class.original_string: private static final String ROLE_ORGANIZATION_USER = "ORG_USER";
test_class.type: String
test_class.var_name: ROLE_ORGANIZATION_USER
test_class.declarator: ORGANIZATION_1 = new Organization(fromString("53ac29ab-ecc6-431e-bde0-64440cd3dc93"),
              "organization-1", new OrganizationAddress("street-1", "city-1",
              "state-1", "country-1", "postal-1"), "website-1", "contactName", "phoneNumber", "email@company.com", false)
test_class.modifier: private static final
test_class.original_string: private static final Organization ORGANIZATION_1 = new Organization(fromString("53ac29ab-ecc6-431e-bde0-64440cd3dc93"),
              "organization-1", new OrganizationAddress("street-1", "city-1",
              "state-1", "country-1", "postal-1"), "website-1", "contactName", "phoneNumber", "email@company.com", false);
test_class.type: Organization
test_class.var_name: ORGANIZATION_1
test_class.declarator: ORGANIZATION_2 = new Organization(fromString("a29797ff-11eb-40e4-9024-30e8cca17096"),
              "organization-2", new OrganizationAddress("street-2", "city-2",
              "state-2", "country-2", "postal-2"), "website-2", "", "", "", false)
test_class.modifier: private static final
test_class.original_string: private static final Organization ORGANIZATION_2 = new Organization(fromString("a29797ff-11eb-40e4-9024-30e8cca17096"),
              "organization-2", new OrganizationAddress("street-2", "city-2",
              "state-2", "country-2", "postal-2"), "website-2", "", "", "", false);
test_class.type: Organization
test_class.var_name: ORGANIZATION_2
test_class.declarator: mockMvc
test_class.modifier: @Autowired
      private
test_class.original_string: @Autowired
      private MockMvc mockMvc;
test_class.type: MockMvc
test_class.var_name: mockMvc
test_class.declarator: objectMapper
test_class.modifier: @Autowired
      private
test_class.original_string: @Autowired
      private ObjectMapper objectMapper;
test_class.type: ObjectMapper
test_class.var_name: objectMapper
test_class.declarator: organizationsService
test_class.modifier: @MockBean
      private
test_class.original_string: @MockBean
      private OrganizationsService organizationsService;
test_class.type: OrganizationsService
test_class.var_name: organizationsService
test_class.declarator: organizationsReadService
test_class.modifier: @MockBean
      private
test_class.original_string: @MockBean
      private OrganizationsReadService organizationsReadService;
test_class.type: OrganizationsReadService
test_class.var_name: organizationsReadService
test_class.declarator: usersService
test_class.modifier: @MockBean
      private
test_class.original_string: @MockBean
      private UsersService usersService;
test_class.type: UsersService
test_class.var_name: usersService
test_class.declarator: usersReadService
test_class.modifier: @MockBean
      private
test_class.original_string: @MockBean
      private UsersReadService usersReadService;
test_class.type: UsersReadService
test_class.var_name: usersReadService
test_class.file: api/src/test/java/engineering/everest/lhotse/api/rest/controllers/AdminOrganizationsControllerTest.java
test_class.identifier: AdminOrganizationsControllerTest
test_case.body: @Test
      @WithMockUser(username = ADMIN_USERNAME, roles = ROLE_ADMIN)
      void enableOrganizationWillDelegate_WhenRequestingUserIsAdmin() throws Exception {
          mockMvc.perform(post("/admin/organizations/{organizationId}", ORGANIZATION_2.getId()))
                  .andExpect(status().isOk());
  
          verify(organizationsService).enableOrganization(ADMIN_USER.getId(), ORGANIZATION_2.getId());
      }
test_case.class_method_signature: AdminOrganizationsControllerTest.enableOrganizationWillDelegate_WhenRequestingUserIsAdmin()
test_case.full_signature: @Test @WithMockUser(username = ADMIN_USERNAME, roles = ROLE_ADMIN) void enableOrganizationWillDelegate_WhenRequestingUserIsAdmin()
test_case.identifier: enableOrganizationWillDelegate_WhenRequestingUserIsAdmin
test_case.invocations: andExpect perform post getId isOk status enableOrganization verify getId getId
test_case.modifiers: @Test @WithMockUser(username = ADMIN_USERNAME, roles = ROLE_ADMIN)
test_case.parameters: ()
test_case.return: void
test_case.signature: void enableOrganizationWillDelegate_WhenRequestingUserIsAdmin()
focal_class.declarator: dtoConverter
focal_class.modifier: private final
focal_class.original_string: private final DtoConverter dtoConverter;
focal_class.type: DtoConverter
focal_class.var_name: dtoConverter
focal_class.declarator: organizationsService
focal_class.modifier: private final
focal_class.original_string: private final OrganizationsService organizationsService;
focal_class.type: OrganizationsService
focal_class.var_name: organizationsService
focal_class.declarator: organizationsReadService
focal_class.modifier: private final
focal_class.original_string: private final OrganizationsReadService organizationsReadService;
focal_class.type: OrganizationsReadService
focal_class.var_name: organizationsReadService
focal_class.file: api/src/main/java/engineering/everest/lhotse/api/rest/controllers/AdminOrganizationsController.java
focal_class.identifier: AdminOrganizationsController
focal_class.class_method_signature: AdminOrganizationsController.AdminOrganizationsController(DtoConverter dtoConverter,
                                          OrganizationsService organizationsService,
                                          OrganizationsReadService organizationsReadService)
focal_class.full_signature: @Autowired public  AdminOrganizationsController(DtoConverter dtoConverter,
                                          OrganizationsService organizationsService,
                                          OrganizationsReadService organizationsReadService)
focal_class.identifier: AdminOrganizationsController
focal_class.modifiers: @Autowired public
focal_class.parameters: (DtoConverter dtoConverter,
                                          OrganizationsService organizationsService,
                                          OrganizationsReadService organizationsReadService)
focal_class.signature:  AdminOrganizationsController(DtoConverter dtoConverter,
                                          OrganizationsService organizationsService,
                                          OrganizationsReadService organizationsReadService)
focal_class.class_method_signature: AdminOrganizationsController.getAllOrganizations()
focal_class.full_signature: @GetMapping @ResponseStatus(OK) @ApiOperation(produces = APPLICATION_JSON_VALUE, value = "Retrieves details of all organizations") @AdminOnly public List<OrganizationResponse> getAllOrganizations()
focal_class.identifier: getAllOrganizations
focal_class.modifiers: @GetMapping @ResponseStatus(OK) @ApiOperation(produces = APPLICATION_JSON_VALUE, value = "Retrieves details of all organizations") @AdminOnly public
focal_class.parameters: ()
focal_class.return: List<OrganizationResponse>
focal_class.signature: List<OrganizationResponse> getAllOrganizations()
focal_class.class_method_signature: AdminOrganizationsController.newOrganization(User requestingUser, @RequestBody @Valid NewOrganizationRequest request)
focal_class.full_signature: @PostMapping @ResponseStatus(CREATED) @ApiOperation("Register a new organization") @AdminOnly public UUID newOrganization(User requestingUser, @RequestBody @Valid NewOrganizationRequest request)
focal_class.identifier: newOrganization
focal_class.modifiers: @PostMapping @ResponseStatus(CREATED) @ApiOperation("Register a new organization") @AdminOnly public
focal_class.parameters: (User requestingUser, @RequestBody @Valid NewOrganizationRequest request)
focal_class.return: UUID
focal_class.signature: UUID newOrganization(User requestingUser, @RequestBody @Valid NewOrganizationRequest request)
focal_class.class_method_signature: AdminOrganizationsController.disableOrganization(User requestingUser, @PathVariable UUID organizationId)
focal_class.full_signature: @DeleteMapping("/{organizationId}") @ResponseStatus(OK) @ApiOperation("Disable an organization") @AdminOnly public void disableOrganization(User requestingUser, @PathVariable UUID organizationId)
focal_class.identifier: disableOrganization
focal_class.modifiers: @DeleteMapping("/{organizationId}") @ResponseStatus(OK) @ApiOperation("Disable an organization") @AdminOnly public
focal_class.parameters: (User requestingUser, @PathVariable UUID organizationId)
focal_class.return: void
focal_class.signature: void disableOrganization(User requestingUser, @PathVariable UUID organizationId)
focal_class.class_method_signature: AdminOrganizationsController.enableOrganization(User requestingUser, @PathVariable UUID organizationId)
focal_class.full_signature: @PostMapping("/{organizationId}") @ResponseStatus(OK) @ApiOperation("Enable an organization") @AdminOnly public void enableOrganization(User requestingUser, @PathVariable UUID organizationId)
focal_class.identifier: enableOrganization
focal_class.modifiers: @PostMapping("/{organizationId}") @ResponseStatus(OK) @ApiOperation("Enable an organization") @AdminOnly public
focal_class.parameters: (User requestingUser, @PathVariable UUID organizationId)
focal_class.return: void
focal_class.signature: void enableOrganization(User requestingUser, @PathVariable UUID organizationId)
focal_method.body: @PostMapping("/{organizationId}")
      @ResponseStatus(OK)
      @ApiOperation("Enable an organization")
      @AdminOnly
      public void enableOrganization(User requestingUser, @PathVariable UUID organizationId) {
          organizationsService.enableOrganization(requestingUser.getId(), organizationId);
      }
focal_method.class_method_signature: AdminOrganizationsController.enableOrganization(User requestingUser, @PathVariable UUID organizationId)
focal_method.full_signature: @PostMapping("/{organizationId}") @ResponseStatus(OK) @ApiOperation("Enable an organization") @AdminOnly public void enableOrganization(User requestingUser, @PathVariable UUID organizationId)
focal_method.identifier: enableOrganization
focal_method.invocations: enableOrganization getId
focal_method.modifiers: @PostMapping("/{organizationId}") @ResponseStatus(OK) @ApiOperation("Enable an organization") @AdminOnly public
focal_method.parameters: (User requestingUser, @PathVariable UUID organizationId)
focal_method.return: void
focal_method.signature: void enableOrganization(User requestingUser, @PathVariable UUID organizationId)