test_class.declarator: dispatcher
test_class.modifier: @Autowired
  	private
test_class.original_string: @Autowired
  	private CommandDispatcher dispatcher;
test_class.type: CommandDispatcher
test_class.var_name: dispatcher
test_class.file: command/src/test/java/org/geomajas/command/general/LogCommandTest.java
test_class.identifier: LogCommandTest
test_case.body: @Test
  	public void testLog() throws Exception {
  		LogRequest request = new LogRequest();
  		request.setLevel(LogRequest.LEVEL_INFO);
  		request.setStatement("Test log command");
  		CommandResponse response = dispatcher.execute(LogRequest.COMMAND, request, null, "en");
  		if (response.isError()) {
  			response.getErrors().get(0).printStackTrace();
  		}
  		Assert.assertFalse(response.isError());
  
  		request.setLevel(LogRequest.LEVEL_DEBUG);
  		request.setStatement("Test debug log command");
  		response = dispatcher.execute(LogRequest.COMMAND, request, null, "en");
  		if (response.isError()) {
  			response.getErrors().get(0).printStackTrace();
  		}
  		Assert.assertFalse(response.isError());
  
  		request.setLevel(LogRequest.LEVEL_WARN);
  		request.setStatement("Test warn log command");
  		response = dispatcher.execute(LogRequest.COMMAND, request, null, "en");
  		if (response.isError()) {
  			response.getErrors().get(0).printStackTrace();
  		}
  		Assert.assertFalse(response.isError());
  
  		request.setLevel(LogRequest.LEVEL_ERROR);
  		request.setStatement("Test error log command");
  		response = dispatcher.execute(LogRequest.COMMAND, request, null, "en");
  		if (response.isError()) {
  			response.getErrors().get(0).printStackTrace();
  		}
  		Assert.assertFalse(response.isError());
  	}
test_case.class_method_signature: LogCommandTest.testLog()
test_case.full_signature: @Test public void testLog()
test_case.identifier: testLog
test_case.invocations: setLevel setStatement execute isError printStackTrace get getErrors assertFalse isError setLevel setStatement execute isError printStackTrace get getErrors assertFalse isError setLevel setStatement execute isError printStackTrace get getErrors assertFalse isError setLevel setStatement execute isError printStackTrace get getErrors assertFalse isError
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testLog()
focal_class.declarator: log = LoggerFactory.getLogger(LogCommand.class)
focal_class.modifier: private final
focal_class.original_string: private final Logger log = LoggerFactory.getLogger(LogCommand.class);
focal_class.type: Logger
focal_class.var_name: log
focal_class.file: command/src/main/java/org/geomajas/command/general/LogCommand.java
focal_class.identifier: LogCommand
focal_class.interfaces: implements CommandHasRequest<LogRequest, CommandResponse>
focal_class.class_method_signature: LogCommand.getEmptyCommandRequest()
focal_class.full_signature: @Override public LogRequest getEmptyCommandRequest()
focal_class.identifier: getEmptyCommandRequest
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: LogRequest
focal_class.signature: LogRequest getEmptyCommandRequest()
focal_class.class_method_signature: LogCommand.getEmptyCommandResponse()
focal_class.full_signature: @Override public CommandResponse getEmptyCommandResponse()
focal_class.identifier: getEmptyCommandResponse
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: CommandResponse
focal_class.signature: CommandResponse getEmptyCommandResponse()
focal_class.class_method_signature: LogCommand.execute(LogRequest request, CommandResponse response)
focal_class.full_signature: @Override public void execute(LogRequest request, CommandResponse response)
focal_class.identifier: execute
focal_class.modifiers: @Override public
focal_class.parameters: (LogRequest request, CommandResponse response)
focal_class.return: void
focal_class.signature: void execute(LogRequest request, CommandResponse response)
focal_method.body: @Override
  	public void execute(LogRequest request, CommandResponse response) throws Exception {
  		switch (request.getLevel()) {
  			case LogRequest.LEVEL_DEBUG:
  				log.debug(request.getStatement());
  				break;
  			case LogRequest.LEVEL_INFO:
  				log.info(request.getStatement());
  				break;
  			case LogRequest.LEVEL_WARN:
  				log.warn(request.getStatement());
  				break;
  			case LogRequest.LEVEL_ERROR:
  				log.error(request.getStatement());
  				break;
  			default:
  				throw new IllegalArgumentException("Unknown log level " + request.getLevel());
  		}
  	}
focal_method.class_method_signature: LogCommand.execute(LogRequest request, CommandResponse response)
focal_method.full_signature: @Override public void execute(LogRequest request, CommandResponse response)
focal_method.identifier: execute
focal_method.invocations: getLevel debug getStatement info getStatement warn getStatement error getStatement getLevel
focal_method.modifiers: @Override public
focal_method.parameters: (LogRequest request, CommandResponse response)
focal_method.return: void
focal_method.signature: void execute(LogRequest request, CommandResponse response)