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: configService
test_class.modifier: @MockBean
  	private
test_class.original_string: @MockBean
  	private ConfigService configService;
test_class.type: ConfigService
test_class.var_name: configService
test_class.declarator: authFilter
test_class.modifier: @MockBean
  	private
test_class.original_string: @MockBean
  	private AuthFilter authFilter;
test_class.type: AuthFilter
test_class.var_name: authFilter
test_class.file: http-service/src/test/java/net/runelite/http/service/config/ConfigControllerTest.java
test_class.identifier: ConfigControllerTest
test_case.body: @Test
  	public void testSetKey() throws Exception
  	{
  		mockMvc.perform(put("/config/key")
  			.content("value")
  			.contentType(MediaType.TEXT_PLAIN))
  			.andExpect(status().isOk());
  
  		verify(configService).setKey(anyInt(), eq("key"), eq("value"));
  	}
test_case.class_method_signature: ConfigControllerTest.testSetKey()
test_case.full_signature: @Test public void testSetKey()
test_case.identifier: testSetKey
test_case.invocations: andExpect perform contentType content put isOk status setKey verify anyInt eq eq
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testSetKey()
focal_class.declarator: configService
focal_class.modifier: private final
focal_class.original_string: private final ConfigService configService;
focal_class.type: ConfigService
focal_class.var_name: configService
focal_class.declarator: authFilter
focal_class.modifier: private final
focal_class.original_string: private final AuthFilter authFilter;
focal_class.type: AuthFilter
focal_class.var_name: authFilter
focal_class.file: http-service/src/main/java/net/runelite/http/service/config/ConfigController.java
focal_class.identifier: ConfigController
focal_class.class_method_signature: ConfigController.ConfigController(ConfigService configService, AuthFilter authFilter)
focal_class.full_signature: @Autowired public  ConfigController(ConfigService configService, AuthFilter authFilter)
focal_class.identifier: ConfigController
focal_class.modifiers: @Autowired public
focal_class.parameters: (ConfigService configService, AuthFilter authFilter)
focal_class.signature:  ConfigController(ConfigService configService, AuthFilter authFilter)
focal_class.class_method_signature: ConfigController.get(HttpServletRequest request, HttpServletResponse response)
focal_class.full_signature: @GetMapping public Configuration get(HttpServletRequest request, HttpServletResponse response)
focal_class.identifier: get
focal_class.modifiers: @GetMapping public
focal_class.parameters: (HttpServletRequest request, HttpServletResponse response)
focal_class.return: Configuration
focal_class.signature: Configuration get(HttpServletRequest request, HttpServletResponse response)
focal_class.class_method_signature: ConfigController.setKey(
  		HttpServletRequest request,
  		HttpServletResponse response,
  		@PathVariable String key,
  		@RequestBody(required = false) String value
  	)
focal_class.full_signature: @RequestMapping(path = "/{key:.+}", method = PUT) public void setKey(
  		HttpServletRequest request,
  		HttpServletResponse response,
  		@PathVariable String key,
  		@RequestBody(required = false) String value
  	)
focal_class.identifier: setKey
focal_class.modifiers: @RequestMapping(path = "/{key:.+}", method = PUT) public
focal_class.parameters: (
  		HttpServletRequest request,
  		HttpServletResponse response,
  		@PathVariable String key,
  		@RequestBody(required = false) String value
  	)
focal_class.return: void
focal_class.signature: void setKey(
  		HttpServletRequest request,
  		HttpServletResponse response,
  		@PathVariable String key,
  		@RequestBody(required = false) String value
  	)
focal_class.class_method_signature: ConfigController.unsetKey(
  		HttpServletRequest request,
  		HttpServletResponse response,
  		@PathVariable String key
  	)
focal_class.full_signature: @RequestMapping(path = "/{key:.+}", method = DELETE) public void unsetKey(
  		HttpServletRequest request,
  		HttpServletResponse response,
  		@PathVariable String key
  	)
focal_class.identifier: unsetKey
focal_class.modifiers: @RequestMapping(path = "/{key:.+}", method = DELETE) public
focal_class.parameters: (
  		HttpServletRequest request,
  		HttpServletResponse response,
  		@PathVariable String key
  	)
focal_class.return: void
focal_class.signature: void unsetKey(
  		HttpServletRequest request,
  		HttpServletResponse response,
  		@PathVariable String key
  	)
focal_method.body: @RequestMapping(path = "/{key:.+}", method = PUT)
  	public void setKey(
  		HttpServletRequest request,
  		HttpServletResponse response,
  		@PathVariable String key,
  		@RequestBody(required = false) String value
  	) throws IOException
  	{
  		SessionEntry session = authFilter.handle(request, response);
  
  		if (session == null)
  		{
  			return;
  		}
  
  		if (!configService.setKey(session.getUser(), key, value))
  		{
  			response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
  		}
  	}
focal_method.class_method_signature: ConfigController.setKey(
  		HttpServletRequest request,
  		HttpServletResponse response,
  		@PathVariable String key,
  		@RequestBody(required = false) String value
  	)
focal_method.full_signature: @RequestMapping(path = "/{key:.+}", method = PUT) public void setKey(
  		HttpServletRequest request,
  		HttpServletResponse response,
  		@PathVariable String key,
  		@RequestBody(required = false) String value
  	)
focal_method.identifier: setKey
focal_method.invocations: handle setKey getUser setStatus
focal_method.modifiers: @RequestMapping(path = "/{key:.+}", method = PUT) public
focal_method.parameters: (
  		HttpServletRequest request,
  		HttpServletResponse response,
  		@PathVariable String key,
  		@RequestBody(required = false) String value
  	)
focal_method.return: void
focal_method.signature: void setKey(
  		HttpServletRequest request,
  		HttpServletResponse response,
  		@PathVariable String key,
  		@RequestBody(required = false) String value
  	)