test_class.declarator: VEN_URL = "/Ven/"
test_class.modifier: private static final
test_class.original_string: private static final String VEN_URL = "/Ven/";
test_class.type: String
test_class.var_name: VEN_URL
test_class.declarator: GROUP_URL = "/Group/"
test_class.modifier: private static final
test_class.original_string: private static final String GROUP_URL = "/Group/";
test_class.type: String
test_class.var_name: GROUP_URL
test_class.declarator: MARKET_CONTEXT_URL = "/MarketContext/"
test_class.modifier: private static final
test_class.original_string: private static final String MARKET_CONTEXT_URL = "/MarketContext/";
test_class.type: String
test_class.var_name: MARKET_CONTEXT_URL
test_class.declarator: wac
test_class.modifier: @Autowired
  	private
test_class.original_string: @Autowired
  	private WebApplicationContext wac;
test_class.type: WebApplicationContext
test_class.var_name: wac
test_class.declarator: springSecurityFilterChain
test_class.modifier: @Autowired
  	private
test_class.original_string: @Autowired
  	private Filter springSecurityFilterChain;
test_class.type: Filter
test_class.var_name: springSecurityFilterChain
test_class.declarator: mockMvc
test_class.modifier: private
test_class.original_string: private MockMvc mockMvc;
test_class.type: MockMvc
test_class.var_name: mockMvc
test_class.declarator: mapper = new ObjectMapper()
test_class.modifier: private
test_class.original_string: private ObjectMapper mapper = new ObjectMapper();
test_class.type: ObjectMapper
test_class.var_name: mapper
test_class.declarator: adminSession = SecurityMockMvcRequestPostProcessors.user("admin").roles("ADMIN")
test_class.modifier: private
test_class.original_string: private UserRequestPostProcessor adminSession = SecurityMockMvcRequestPostProcessors.user("admin").roles("ADMIN");
test_class.type: UserRequestPostProcessor
test_class.var_name: adminSession
test_class.declarator: venSession = SecurityMockMvcRequestPostProcessors.user("ven1").roles("VEN")
test_class.modifier: private
test_class.original_string: private UserRequestPostProcessor venSession = SecurityMockMvcRequestPostProcessors.user("ven1").roles("VEN");
test_class.type: UserRequestPostProcessor
test_class.var_name: venSession
test_class.declarator: userSession = SecurityMockMvcRequestPostProcessors.user("ven1").roles("USER")
test_class.modifier: private
test_class.original_string: private UserRequestPostProcessor userSession = SecurityMockMvcRequestPostProcessors.user("ven1").roles("USER");
test_class.type: UserRequestPostProcessor
test_class.var_name: userSession
test_class.declarator: venService
test_class.modifier: @Resource
  	private
test_class.original_string: @Resource
  	private VenService venService;
test_class.type: VenService
test_class.var_name: venService
test_class.file: OpenADRServerVTNCommon/src/test/java/com/avob/openadr/server/common/vtn/controller/VenControllerTest.java
test_class.identifier: VenControllerTest
test_case.body: @Test
  	public void createVenTest() throws Exception {
  
  		// create login auth app no certificate gen
  		VenCreateDto dto = new VenCreateDto();
  		dto.setCommonName("myapp");
  		dto.setUsername("myapp");
  		dto.setAuthenticationType("login");
  		dto.setPassword("pass");
  		byte[] content = mapper.writeValueAsBytes(dto);
  		MvcResult andReturn = this.mockMvc
  				.perform(MockMvcRequestBuilders.post(VEN_URL).content(content)
  						.header("Content-Type", "application/json").with(adminSession))
  				.andExpect(MockMvcResultMatchers.status().is(HttpStatus.CREATED_201)).andReturn();
  		assertEquals(0, andReturn.getResponse().getContentLength());
  		// verify app has been created
  		Ven findByUsername = venService.findOneByUsername("myapp");
  		assertNotNull(findByUsername);
  		venService.delete(findByUsername);
  
  		// create x509 auth app no certificate gen
  		dto = new VenCreateDto();
  		dto.setCommonName("myapp");
  		dto.setUsername("myapp");
  		dto.setAuthenticationType("x509");
  		content = mapper.writeValueAsBytes(dto);
  		andReturn = this.mockMvc
  				.perform(MockMvcRequestBuilders.post(VEN_URL).content(content)
  						.header("Content-Type", "application/json").with(adminSession))
  				.andExpect(MockMvcResultMatchers.status().is(HttpStatus.CREATED_201)).andReturn();
  		assertEquals(0, andReturn.getResponse().getContentLength());
  		// verify app has been created
  		findByUsername = venService.findOneByUsername("myapp");
  		assertNotNull(findByUsername);
  		venService.delete(findByUsername);
  
  		// create x509 app user rsa certificate gen
  		dto = new VenCreateDto();
  		dto.setCommonName("myapp");
  		dto.setAuthenticationType("x509");
  		dto.setNeedCertificateGeneration("rsa");
  		content = mapper.writeValueAsBytes(dto);
  		andReturn = this.mockMvc
  				.perform(MockMvcRequestBuilders.post(VEN_URL).content(content)
  						.header("Content-Type", "application/json").with(adminSession))
  				.andExpect(MockMvcResultMatchers.status().is(HttpStatus.CREATED_201)).andReturn();
  		assertNotEquals(0, andReturn.getResponse().getContentLength());
  		// verify app has been created
  		assertNotNull(andReturn.getResponse().getHeader("x-VenID"));
  		findByUsername = venService.findOneByUsername(andReturn.getResponse().getHeader("x-VenID"));
  		assertNotNull(findByUsername);
  		assertFalse(findByUsername.getReportOnly());
  		assertFalse(findByUsername.getXmlSignature());
  		venService.delete(findByUsername);
  
  		// create x509 auth app ecc certificate gen
  		dto = new VenCreateDto();
  		dto.setCommonName("myapp");
  		dto.setAuthenticationType("x509");
  		dto.setNeedCertificateGeneration("ecc");
  		dto.setReportOnly(true);
  		dto.setXmlSignature(true);
  		content = mapper.writeValueAsBytes(dto);
  		andReturn = this.mockMvc
  				.perform(MockMvcRequestBuilders.post(VEN_URL).content(content)
  						.header("Content-Type", "application/json").with(adminSession))
  				.andExpect(MockMvcResultMatchers.status().is(HttpStatus.CREATED_201)).andReturn();
  		assertNotEquals(0, andReturn.getResponse().getContentLength());
  		// verify app has been created
  		assertNotNull(andReturn.getResponse().getHeader("x-VenID"));
  		findByUsername = venService.findOneByUsername(andReturn.getResponse().getHeader("x-VenID"));
  		assertNotNull(findByUsername);
  		assertTrue(findByUsername.getReportOnly());
  		assertTrue(findByUsername.getXmlSignature());
  		venService.delete(findByUsername);
  
  	}
test_case.class_method_signature: VenControllerTest.createVenTest()
test_case.full_signature: @Test public void createVenTest()
test_case.identifier: createVenTest
test_case.invocations: setCommonName setUsername setAuthenticationType setPassword writeValueAsBytes andReturn andExpect perform with header content post is status assertEquals getContentLength getResponse findOneByUsername assertNotNull delete setCommonName setUsername setAuthenticationType writeValueAsBytes andReturn andExpect perform with header content post is status assertEquals getContentLength getResponse findOneByUsername assertNotNull delete setCommonName setAuthenticationType setNeedCertificateGeneration writeValueAsBytes andReturn andExpect perform with header content post is status assertNotEquals getContentLength getResponse assertNotNull getHeader getResponse findOneByUsername getHeader getResponse assertNotNull assertFalse getReportOnly assertFalse getXmlSignature delete setCommonName setAuthenticationType setNeedCertificateGeneration setReportOnly setXmlSignature writeValueAsBytes andReturn andExpect perform with header content post is status assertNotEquals getContentLength getResponse assertNotNull getHeader getResponse findOneByUsername getHeader getResponse assertNotNull assertTrue getReportOnly assertTrue getXmlSignature delete
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void createVenTest()
focal_class.declarator: LOGGER = LoggerFactory.getLogger(VenController.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = LoggerFactory.getLogger(VenController.class);
focal_class.type: Logger
focal_class.var_name: LOGGER
focal_class.declarator: venService
focal_class.modifier: @Resource
  	private
focal_class.original_string: @Resource
  	private VenService venService;
focal_class.type: VenService
focal_class.var_name: venService
focal_class.declarator: venResourceService
focal_class.modifier: @Resource
  	private
focal_class.original_string: @Resource
  	private VenResourceService venResourceService;
focal_class.type: VenResourceService
focal_class.var_name: venResourceService
focal_class.declarator: venGroupService
focal_class.modifier: @Resource
  	private
focal_class.original_string: @Resource
  	private VenGroupService venGroupService;
focal_class.type: VenGroupService
focal_class.var_name: venGroupService
focal_class.declarator: venMarketContextService
focal_class.modifier: @Resource
  	private
focal_class.original_string: @Resource
  	private VenMarketContextService venMarketContextService;
focal_class.type: VenMarketContextService
focal_class.var_name: venMarketContextService
focal_class.declarator: dtoMapper
focal_class.modifier: @Resource
  	private
focal_class.original_string: @Resource
  	private DtoMapper dtoMapper;
focal_class.type: DtoMapper
focal_class.var_name: dtoMapper
focal_class.file: OpenADRServerVTNCommon/src/main/java/com/avob/openadr/server/common/vtn/controller/VenController.java
focal_class.identifier: VenController
focal_class.class_method_signature: VenController.listVen()
focal_class.full_signature: @RequestMapping(value = "/", method = RequestMethod.GET) @ResponseBody public List<VenDto> listVen()
focal_class.identifier: listVen
focal_class.modifiers: @RequestMapping(value = "/", method = RequestMethod.GET) @ResponseBody public
focal_class.parameters: ()
focal_class.return: List<VenDto>
focal_class.signature: List<VenDto> listVen()
focal_class.class_method_signature: VenController.searchVen(@RequestBody List<VenFilter> filters, @RequestParam("page") int page,
  			@RequestParam("size") int size, HttpServletResponse response)
focal_class.full_signature: @RequestMapping(value = "/search", method = RequestMethod.POST) @ResponseBody public List<VenDto> searchVen(@RequestBody List<VenFilter> filters, @RequestParam("page") int page,
  			@RequestParam("size") int size, HttpServletResponse response)
focal_class.identifier: searchVen
focal_class.modifiers: @RequestMapping(value = "/search", method = RequestMethod.POST) @ResponseBody public
focal_class.parameters: (@RequestBody List<VenFilter> filters, @RequestParam("page") int page,
  			@RequestParam("size") int size, HttpServletResponse response)
focal_class.return: List<VenDto>
focal_class.signature: List<VenDto> searchVen(@RequestBody List<VenFilter> filters, @RequestParam("page") int page,
  			@RequestParam("size") int size, HttpServletResponse response)
focal_class.class_method_signature: VenController.createVen(@Valid @RequestBody VenCreateDto dto,
  			HttpServletResponse response)
focal_class.full_signature: @RequestMapping(value = "/", method = RequestMethod.POST) @ResponseBody public ResponseEntity<InputStreamResource> createVen(@Valid @RequestBody VenCreateDto dto,
  			HttpServletResponse response)
focal_class.identifier: createVen
focal_class.modifiers: @RequestMapping(value = "/", method = RequestMethod.POST) @ResponseBody public
focal_class.parameters: (@Valid @RequestBody VenCreateDto dto,
  			HttpServletResponse response)
focal_class.return: ResponseEntity<InputStreamResource>
focal_class.signature: ResponseEntity<InputStreamResource> createVen(@Valid @RequestBody VenCreateDto dto,
  			HttpServletResponse response)
focal_class.class_method_signature: VenController.updateVen(@PathVariable("venID") String venUsername, @Valid @RequestBody VenUpdateDto dto,
  			HttpServletResponse response)
focal_class.full_signature: @RequestMapping(value = "/{venID}", method = RequestMethod.PUT) @ResponseBody public VenCreateDto updateVen(@PathVariable("venID") String venUsername, @Valid @RequestBody VenUpdateDto dto,
  			HttpServletResponse response)
focal_class.identifier: updateVen
focal_class.modifiers: @RequestMapping(value = "/{venID}", method = RequestMethod.PUT) @ResponseBody public
focal_class.parameters: (@PathVariable("venID") String venUsername, @Valid @RequestBody VenUpdateDto dto,
  			HttpServletResponse response)
focal_class.return: VenCreateDto
focal_class.signature: VenCreateDto updateVen(@PathVariable("venID") String venUsername, @Valid @RequestBody VenUpdateDto dto,
  			HttpServletResponse response)
focal_class.class_method_signature: VenController.findVenByUsername(@PathVariable("venID") String venUsername, HttpServletResponse response)
focal_class.full_signature: @RequestMapping(value = "/{venID}", method = RequestMethod.GET) @ResponseBody public VenDto findVenByUsername(@PathVariable("venID") String venUsername, HttpServletResponse response)
focal_class.identifier: findVenByUsername
focal_class.modifiers: @RequestMapping(value = "/{venID}", method = RequestMethod.GET) @ResponseBody public
focal_class.parameters: (@PathVariable("venID") String venUsername, HttpServletResponse response)
focal_class.return: VenDto
focal_class.signature: VenDto findVenByUsername(@PathVariable("venID") String venUsername, HttpServletResponse response)
focal_class.class_method_signature: VenController.deleteVenByUsername(@PathVariable("venID") String venUsername, HttpServletResponse response)
focal_class.full_signature: @RequestMapping(value = "/{venID}", method = RequestMethod.DELETE) @ResponseBody public void deleteVenByUsername(@PathVariable("venID") String venUsername, HttpServletResponse response)
focal_class.identifier: deleteVenByUsername
focal_class.modifiers: @RequestMapping(value = "/{venID}", method = RequestMethod.DELETE) @ResponseBody public
focal_class.parameters: (@PathVariable("venID") String venUsername, HttpServletResponse response)
focal_class.return: void
focal_class.signature: void deleteVenByUsername(@PathVariable("venID") String venUsername, HttpServletResponse response)
focal_class.class_method_signature: VenController.createVenResource(@PathVariable("venID") String venUsername, @RequestBody VenResourceDto dto,
  			HttpServletResponse response)
focal_class.full_signature: @RequestMapping(value = "/{venID}/resource", method = RequestMethod.POST) @ResponseBody public VenResourceDto createVenResource(@PathVariable("venID") String venUsername, @RequestBody VenResourceDto dto,
  			HttpServletResponse response)
focal_class.identifier: createVenResource
focal_class.modifiers: @RequestMapping(value = "/{venID}/resource", method = RequestMethod.POST) @ResponseBody public
focal_class.parameters: (@PathVariable("venID") String venUsername, @RequestBody VenResourceDto dto,
  			HttpServletResponse response)
focal_class.return: VenResourceDto
focal_class.signature: VenResourceDto createVenResource(@PathVariable("venID") String venUsername, @RequestBody VenResourceDto dto,
  			HttpServletResponse response)
focal_class.class_method_signature: VenController.listVenResource(@PathVariable("venID") String venUsername,
  			HttpServletResponse response)
focal_class.full_signature: @RequestMapping(value = "/{venID}/resource", method = RequestMethod.GET) @ResponseBody public List<VenResourceDto> listVenResource(@PathVariable("venID") String venUsername,
  			HttpServletResponse response)
focal_class.identifier: listVenResource
focal_class.modifiers: @RequestMapping(value = "/{venID}/resource", method = RequestMethod.GET) @ResponseBody public
focal_class.parameters: (@PathVariable("venID") String venUsername,
  			HttpServletResponse response)
focal_class.return: List<VenResourceDto>
focal_class.signature: List<VenResourceDto> listVenResource(@PathVariable("venID") String venUsername,
  			HttpServletResponse response)
focal_class.class_method_signature: VenController.deleteVenResource(@PathVariable("venID") String venUsername,
  			@PathVariable("resourceName") String resourceName, HttpServletResponse response)
focal_class.full_signature: @RequestMapping(value = "/{venID}/resource/{resourceName}", method = RequestMethod.DELETE) @ResponseBody public void deleteVenResource(@PathVariable("venID") String venUsername,
  			@PathVariable("resourceName") String resourceName, HttpServletResponse response)
focal_class.identifier: deleteVenResource
focal_class.modifiers: @RequestMapping(value = "/{venID}/resource/{resourceName}", method = RequestMethod.DELETE) @ResponseBody public
focal_class.parameters: (@PathVariable("venID") String venUsername,
  			@PathVariable("resourceName") String resourceName, HttpServletResponse response)
focal_class.return: void
focal_class.signature: void deleteVenResource(@PathVariable("venID") String venUsername,
  			@PathVariable("resourceName") String resourceName, HttpServletResponse response)
focal_class.class_method_signature: VenController.addGroupToVen(@PathVariable("venID") String venUsername, @RequestParam("groupId") Long groupId,
  			HttpServletResponse response)
focal_class.full_signature: @RequestMapping(value = "/{venID}/group", method = RequestMethod.POST) @ResponseBody public VenCreateDto addGroupToVen(@PathVariable("venID") String venUsername, @RequestParam("groupId") Long groupId,
  			HttpServletResponse response)
focal_class.identifier: addGroupToVen
focal_class.modifiers: @RequestMapping(value = "/{venID}/group", method = RequestMethod.POST) @ResponseBody public
focal_class.parameters: (@PathVariable("venID") String venUsername, @RequestParam("groupId") Long groupId,
  			HttpServletResponse response)
focal_class.return: VenCreateDto
focal_class.signature: VenCreateDto addGroupToVen(@PathVariable("venID") String venUsername, @RequestParam("groupId") Long groupId,
  			HttpServletResponse response)
focal_class.class_method_signature: VenController.listVenGroup(@PathVariable("venID") String venUsername, HttpServletResponse response)
focal_class.full_signature: @RequestMapping(value = "/{venID}/group", method = RequestMethod.GET) @ResponseBody public List<VenGroupDto> listVenGroup(@PathVariable("venID") String venUsername, HttpServletResponse response)
focal_class.identifier: listVenGroup
focal_class.modifiers: @RequestMapping(value = "/{venID}/group", method = RequestMethod.GET) @ResponseBody public
focal_class.parameters: (@PathVariable("venID") String venUsername, HttpServletResponse response)
focal_class.return: List<VenGroupDto>
focal_class.signature: List<VenGroupDto> listVenGroup(@PathVariable("venID") String venUsername, HttpServletResponse response)
focal_class.class_method_signature: VenController.deleteVenGroup(@PathVariable("venID") String venUsername, @RequestParam("groupId") Long groupId,
  			HttpServletResponse response)
focal_class.full_signature: @RequestMapping(value = "/{venID}/group/remove", method = RequestMethod.POST) @ResponseBody public void deleteVenGroup(@PathVariable("venID") String venUsername, @RequestParam("groupId") Long groupId,
  			HttpServletResponse response)
focal_class.identifier: deleteVenGroup
focal_class.modifiers: @RequestMapping(value = "/{venID}/group/remove", method = RequestMethod.POST) @ResponseBody public
focal_class.parameters: (@PathVariable("venID") String venUsername, @RequestParam("groupId") Long groupId,
  			HttpServletResponse response)
focal_class.return: void
focal_class.signature: void deleteVenGroup(@PathVariable("venID") String venUsername, @RequestParam("groupId") Long groupId,
  			HttpServletResponse response)
focal_class.class_method_signature: VenController.addMarketContextToVen(@PathVariable("venID") String venUsername,
  			@RequestParam("marketContextId") Long marketContextId, HttpServletResponse response)
focal_class.full_signature: @RequestMapping(value = "/{venID}/marketContext", method = RequestMethod.POST) @ResponseBody public VenCreateDto addMarketContextToVen(@PathVariable("venID") String venUsername,
  			@RequestParam("marketContextId") Long marketContextId, HttpServletResponse response)
focal_class.identifier: addMarketContextToVen
focal_class.modifiers: @RequestMapping(value = "/{venID}/marketContext", method = RequestMethod.POST) @ResponseBody public
focal_class.parameters: (@PathVariable("venID") String venUsername,
  			@RequestParam("marketContextId") Long marketContextId, HttpServletResponse response)
focal_class.return: VenCreateDto
focal_class.signature: VenCreateDto addMarketContextToVen(@PathVariable("venID") String venUsername,
  			@RequestParam("marketContextId") Long marketContextId, HttpServletResponse response)
focal_class.class_method_signature: VenController.listVenMarketContext(@PathVariable("venID") String venUsername,
  			HttpServletResponse response)
focal_class.full_signature: @RequestMapping(value = "/{venID}/marketContext", method = RequestMethod.GET) @ResponseBody public List<VenMarketContextDto> listVenMarketContext(@PathVariable("venID") String venUsername,
  			HttpServletResponse response)
focal_class.identifier: listVenMarketContext
focal_class.modifiers: @RequestMapping(value = "/{venID}/marketContext", method = RequestMethod.GET) @ResponseBody public
focal_class.parameters: (@PathVariable("venID") String venUsername,
  			HttpServletResponse response)
focal_class.return: List<VenMarketContextDto>
focal_class.signature: List<VenMarketContextDto> listVenMarketContext(@PathVariable("venID") String venUsername,
  			HttpServletResponse response)
focal_class.class_method_signature: VenController.deleteVenMarketContext(@PathVariable("venID") String venUsername,
  			@RequestParam("marketContextId") Long marketContextId, HttpServletResponse response)
focal_class.full_signature: @RequestMapping(value = "/{venID}/marketContext/remove", method = RequestMethod.POST) @ResponseBody public void deleteVenMarketContext(@PathVariable("venID") String venUsername,
  			@RequestParam("marketContextId") Long marketContextId, HttpServletResponse response)
focal_class.identifier: deleteVenMarketContext
focal_class.modifiers: @RequestMapping(value = "/{venID}/marketContext/remove", method = RequestMethod.POST) @ResponseBody public
focal_class.parameters: (@PathVariable("venID") String venUsername,
  			@RequestParam("marketContextId") Long marketContextId, HttpServletResponse response)
focal_class.return: void
focal_class.signature: void deleteVenMarketContext(@PathVariable("venID") String venUsername,
  			@RequestParam("marketContextId") Long marketContextId, HttpServletResponse response)
focal_class.class_method_signature: VenController.cleanRegistration(@PathVariable("venID") String venUsername, HttpServletResponse response)
focal_class.full_signature: @RequestMapping(value = "/{venID}/cleanRegistration", method = RequestMethod.POST) @ResponseBody public void cleanRegistration(@PathVariable("venID") String venUsername, HttpServletResponse response)
focal_class.identifier: cleanRegistration
focal_class.modifiers: @RequestMapping(value = "/{venID}/cleanRegistration", method = RequestMethod.POST) @ResponseBody public
focal_class.parameters: (@PathVariable("venID") String venUsername, HttpServletResponse response)
focal_class.return: void
focal_class.signature: void cleanRegistration(@PathVariable("venID") String venUsername, HttpServletResponse response)
focal_method.body: @RequestMapping(value = "/", method = RequestMethod.POST)
  	@ResponseBody
  	public ResponseEntity<InputStreamResource> createVen(@Valid @RequestBody VenCreateDto dto,
  			HttpServletResponse response) {
  
  		Ven findOneByUsername = venService.findOneByUsername(dto.getUsername());
  
  		if (findOneByUsername != null) {
  			LOGGER.warn("Ven: " + dto.getUsername() + " already exists");
  			return ResponseEntity.status(HttpStatus.NOT_ACCEPTABLE_406)
  					.contentType(MediaType.parseMediaType("application/octet-stream")).body(null);
  		}
  		Ven prepare = venService.prepare(dto);
  		ResponseEntity<InputStreamResource> body = null;
  		try {
  			Optional<File> generateCertificateIfRequired = venService.generateCertificateIfRequired(dto, prepare);
  
  			if (generateCertificateIfRequired.isPresent()) {
  				InputStreamResource resource = new InputStreamResource(
  						new FileInputStream(generateCertificateIfRequired.get()));
  				body = ResponseEntity.status(HttpStatus.CREATED_201)
  						.header("Content-Disposition", "attachment; filename=\"archive.tar\"")
  						.header("X-VenID", prepare.getUsername())
  						.contentLength(generateCertificateIfRequired.get().length())
  						.contentType(MediaType.parseMediaType("application/octet-stream")).body(resource);
  			} else {
  				body = ResponseEntity.status(HttpStatus.CREATED_201).header("x-venID", prepare.getUsername())
  						.body(null);
  			}
  
  		} catch (GenerateX509VenException e) {
  			LOGGER.error("", e);
  			response.setStatus(HttpStatus.NOT_ACCEPTABLE_406);
  		} catch (FileNotFoundException e) {
  			LOGGER.error("", e);
  			response.setStatus(HttpStatus.INTERNAL_SERVER_ERROR_500);
  		}
  
  		venService.save(prepare);
  		LOGGER.info("Create Ven: " + prepare.getUsername());
  
  		return body;
  	}
focal_method.class_method_signature: VenController.createVen(@Valid @RequestBody VenCreateDto dto,
  			HttpServletResponse response)
focal_method.full_signature: @RequestMapping(value = "/", method = RequestMethod.POST) @ResponseBody public ResponseEntity<InputStreamResource> createVen(@Valid @RequestBody VenCreateDto dto,
  			HttpServletResponse response)
focal_method.identifier: createVen
focal_method.invocations: findOneByUsername getUsername warn getUsername body contentType status parseMediaType prepare generateCertificateIfRequired isPresent get body contentType contentLength header header status getUsername length get parseMediaType body header status getUsername error setStatus error setStatus save info getUsername
focal_method.modifiers: @RequestMapping(value = "/", method = RequestMethod.POST) @ResponseBody public
focal_method.parameters: (@Valid @RequestBody VenCreateDto dto,
  			HttpServletResponse response)
focal_method.return: ResponseEntity<InputStreamResource>
focal_method.signature: ResponseEntity<InputStreamResource> createVen(@Valid @RequestBody VenCreateDto dto,
  			HttpServletResponse response)