test_class.declarator: ACCOUNT_URL = "/Account/"
test_class.modifier: private static final
test_class.original_string: private static final String ACCOUNT_URL = "/Account/";
test_class.type: String
test_class.var_name: ACCOUNT_URL
test_class.declarator: ACCOUNT_USER_URL = ACCOUNT_URL + "/user"
test_class.modifier: private static final
test_class.original_string: private static final String ACCOUNT_USER_URL = ACCOUNT_URL + "/user";
test_class.type: String
test_class.var_name: ACCOUNT_USER_URL
test_class.declarator: ACCOUNT_APP_URL = ACCOUNT_URL + "/app"
test_class.modifier: private static final
test_class.original_string: private static final String ACCOUNT_APP_URL = ACCOUNT_URL + "/app";
test_class.type: String
test_class.var_name: ACCOUNT_APP_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: dozerMapper
test_class.modifier: @Resource
  	private
test_class.original_string: @Resource
  	private DtoMapper dozerMapper;
test_class.type: DtoMapper
test_class.var_name: dozerMapper
test_class.declarator: oadrUserService
test_class.modifier: @Resource
  	private
test_class.original_string: @Resource
  	private OadrUserService oadrUserService;
test_class.type: OadrUserService
test_class.var_name: oadrUserService
test_class.declarator: oadrAppService
test_class.modifier: @Resource
  	private
test_class.original_string: @Resource
  	private OadrAppService oadrAppService;
test_class.type: OadrAppService
test_class.var_name: oadrAppService
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: adminUser = null
test_class.modifier: private
test_class.original_string: private OadrUser adminUser = null;
test_class.type: OadrUser
test_class.var_name: adminUser
test_class.declarator: appUser = null
test_class.modifier: private
test_class.original_string: private OadrApp appUser = null;
test_class.type: OadrApp
test_class.var_name: appUser
test_class.declarator: admin = SecurityMockMvcRequestPostProcessors.user("admin").roles("ADMIN")
test_class.modifier: private
test_class.original_string: private UserRequestPostProcessor admin = SecurityMockMvcRequestPostProcessors.user("admin").roles("ADMIN");
test_class.type: UserRequestPostProcessor
test_class.var_name: admin
test_class.declarator: app = SecurityMockMvcRequestPostProcessors.user("app").roles("DEVICE_MANAGER")
test_class.modifier: private
test_class.original_string: private UserRequestPostProcessor app = SecurityMockMvcRequestPostProcessors.user("app").roles("DEVICE_MANAGER");
test_class.type: UserRequestPostProcessor
test_class.var_name: app
test_class.declarator: user = SecurityMockMvcRequestPostProcessors.user("user").roles("USER")
test_class.modifier: private
test_class.original_string: private UserRequestPostProcessor user = SecurityMockMvcRequestPostProcessors.user("user").roles("USER");
test_class.type: UserRequestPostProcessor
test_class.var_name: user
test_class.declarator: appListRef = new TypeReference<List<OadrAppDto>>() {
  	}
test_class.modifier: private
test_class.original_string: private TypeReference<List<OadrAppDto>> appListRef = new TypeReference<List<OadrAppDto>>() {
  	};
test_class.type: TypeReference<List<OadrAppDto>>
test_class.var_name: appListRef
test_class.declarator: userListRef = new TypeReference<List<OadrUserDto>>() {
  	}
test_class.modifier: private
test_class.original_string: private TypeReference<List<OadrUserDto>> userListRef = new TypeReference<List<OadrUserDto>>() {
  	};
test_class.type: TypeReference<List<OadrUserDto>>
test_class.var_name: userListRef
test_class.file: OpenADRServerVTNCommon/src/test/java/com/avob/openadr/server/common/vtn/controller/AccountControllerTest.java
test_class.identifier: AccountControllerTest
test_case.body: @Test
  	public void listAppTest() throws Exception {
  		this.mockMvc.perform(
  				MockMvcRequestBuilders.get(ACCOUNT_APP_URL).header("Content-Type", "application/json").with(user))
  				.andExpect(MockMvcResultMatchers.status().is(HttpStatus.FORBIDDEN_403));
  
  		MvcResult andReturn = this.mockMvc.perform(
  				MockMvcRequestBuilders.get(ACCOUNT_APP_URL).header("Content-Type", "application/json").with(admin))
  				.andExpect(MockMvcResultMatchers.status().is(HttpStatus.OK_200)).andReturn();
  
  		List<OadrAppDto> convertMvcResultToOadrUserDtoList = convertMvcResultToList(andReturn, appListRef);
  		assertEquals(1, convertMvcResultToOadrUserDtoList.size());
  		assertEquals("app", convertMvcResultToOadrUserDtoList.get(0).getUsername());
  	}
test_case.class_method_signature: AccountControllerTest.listAppTest()
test_case.full_signature: @Test public void listAppTest()
test_case.identifier: listAppTest
test_case.invocations: andExpect perform with header get is status andReturn andExpect perform with header get is status convertMvcResultToList assertEquals size assertEquals getUsername get
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void listAppTest()
focal_class.declarator: OCTET_STREAM_MEDIA_TYPE = MediaType.parseMediaType("application/octet-stream")
focal_class.modifier: private static final
focal_class.original_string: private static final MediaType OCTET_STREAM_MEDIA_TYPE = MediaType.parseMediaType("application/octet-stream");
focal_class.type: MediaType
focal_class.var_name: OCTET_STREAM_MEDIA_TYPE
focal_class.declarator: LOGGER = LoggerFactory.getLogger(AccountController.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = LoggerFactory.getLogger(AccountController.class);
focal_class.type: Logger
focal_class.var_name: LOGGER
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.declarator: abstractUserDao
focal_class.modifier: @Resource
  	private
focal_class.original_string: @Resource
  	private AbstractUserDao abstractUserDao;
focal_class.type: AbstractUserDao
focal_class.var_name: abstractUserDao
focal_class.declarator: oadrUserService
focal_class.modifier: @Resource
  	private
focal_class.original_string: @Resource
  	private OadrUserService oadrUserService;
focal_class.type: OadrUserService
focal_class.var_name: oadrUserService
focal_class.declarator: oadrAppService
focal_class.modifier: @Resource
  	private
focal_class.original_string: @Resource
  	private OadrAppService oadrAppService;
focal_class.type: OadrAppService
focal_class.var_name: oadrAppService
focal_class.file: OpenADRServerVTNCommon/src/main/java/com/avob/openadr/server/common/vtn/controller/AccountController.java
focal_class.identifier: AccountController
focal_class.class_method_signature: AccountController.registeredUser(Principal principal)
focal_class.full_signature: @RequestMapping(value = "/", method = RequestMethod.GET) @ResponseBody @PreAuthorize("hasRole('ROLE_ADMIN') or hasRole('ROLE_DEVICE_MANAGER') or hasRole('ROLE_DRPROGRAM')") public AbstractUserWithRoleDto registeredUser(Principal principal)
focal_class.identifier: registeredUser
focal_class.modifiers: @RequestMapping(value = "/", method = RequestMethod.GET) @ResponseBody @PreAuthorize("hasRole('ROLE_ADMIN') or hasRole('ROLE_DEVICE_MANAGER') or hasRole('ROLE_DRPROGRAM')") public
focal_class.parameters: (Principal principal)
focal_class.return: AbstractUserWithRoleDto
focal_class.signature: AbstractUserWithRoleDto registeredUser(Principal principal)
focal_class.class_method_signature: AccountController.listUser()
focal_class.full_signature: @PreAuthorize("hasRole('ROLE_ADMIN')") @RequestMapping(value = "/user", method = RequestMethod.GET) @ResponseBody public List<OadrUserDto> listUser()
focal_class.identifier: listUser
focal_class.modifiers: @PreAuthorize("hasRole('ROLE_ADMIN')") @RequestMapping(value = "/user", method = RequestMethod.GET) @ResponseBody public
focal_class.parameters: ()
focal_class.return: List<OadrUserDto>
focal_class.signature: List<OadrUserDto> listUser()
focal_class.class_method_signature: AccountController.createUser(@RequestBody OadrUserCreateDto dto,
  			HttpServletResponse response)
focal_class.full_signature: @PreAuthorize("hasRole('ROLE_ADMIN')") @RequestMapping(value = "/user", method = RequestMethod.POST) @ResponseBody public ResponseEntity<InputStreamResource> createUser(@RequestBody OadrUserCreateDto dto,
  			HttpServletResponse response)
focal_class.identifier: createUser
focal_class.modifiers: @PreAuthorize("hasRole('ROLE_ADMIN')") @RequestMapping(value = "/user", method = RequestMethod.POST) @ResponseBody public
focal_class.parameters: (@RequestBody OadrUserCreateDto dto,
  			HttpServletResponse response)
focal_class.return: ResponseEntity<InputStreamResource>
focal_class.signature: ResponseEntity<InputStreamResource> createUser(@RequestBody OadrUserCreateDto dto,
  			HttpServletResponse response)
focal_class.class_method_signature: AccountController.deleteUser(@PathVariable("username") String username, HttpServletResponse response)
focal_class.full_signature: @PreAuthorize("hasRole('ROLE_ADMIN')") @RequestMapping(value = "/user/{username}", method = RequestMethod.DELETE) @ResponseBody public void deleteUser(@PathVariable("username") String username, HttpServletResponse response)
focal_class.identifier: deleteUser
focal_class.modifiers: @PreAuthorize("hasRole('ROLE_ADMIN')") @RequestMapping(value = "/user/{username}", method = RequestMethod.DELETE) @ResponseBody public
focal_class.parameters: (@PathVariable("username") String username, HttpServletResponse response)
focal_class.return: void
focal_class.signature: void deleteUser(@PathVariable("username") String username, HttpServletResponse response)
focal_class.class_method_signature: AccountController.listApp()
focal_class.full_signature: @PreAuthorize("hasRole('ROLE_ADMIN')") @RequestMapping(value = "/app", method = RequestMethod.GET) @ResponseBody public List<OadrAppDto> listApp()
focal_class.identifier: listApp
focal_class.modifiers: @PreAuthorize("hasRole('ROLE_ADMIN')") @RequestMapping(value = "/app", method = RequestMethod.GET) @ResponseBody public
focal_class.parameters: ()
focal_class.return: List<OadrAppDto>
focal_class.signature: List<OadrAppDto> listApp()
focal_class.class_method_signature: AccountController.createApp(@RequestBody OadrAppCreateDto dto,
  			HttpServletResponse response)
focal_class.full_signature: @PreAuthorize("hasRole('ROLE_ADMIN')") @RequestMapping(value = "/app", method = RequestMethod.POST) @ResponseBody public ResponseEntity<InputStreamResource> createApp(@RequestBody OadrAppCreateDto dto,
  			HttpServletResponse response)
focal_class.identifier: createApp
focal_class.modifiers: @PreAuthorize("hasRole('ROLE_ADMIN')") @RequestMapping(value = "/app", method = RequestMethod.POST) @ResponseBody public
focal_class.parameters: (@RequestBody OadrAppCreateDto dto,
  			HttpServletResponse response)
focal_class.return: ResponseEntity<InputStreamResource>
focal_class.signature: ResponseEntity<InputStreamResource> createApp(@RequestBody OadrAppCreateDto dto,
  			HttpServletResponse response)
focal_class.class_method_signature: AccountController.deleteApp(@PathVariable("username") String username, HttpServletResponse response)
focal_class.full_signature: @PreAuthorize("hasRole('ROLE_ADMIN')") @RequestMapping(value = "/app/{username}", method = RequestMethod.DELETE) @ResponseBody public void deleteApp(@PathVariable("username") String username, HttpServletResponse response)
focal_class.identifier: deleteApp
focal_class.modifiers: @PreAuthorize("hasRole('ROLE_ADMIN')") @RequestMapping(value = "/app/{username}", method = RequestMethod.DELETE) @ResponseBody public
focal_class.parameters: (@PathVariable("username") String username, HttpServletResponse response)
focal_class.return: void
focal_class.signature: void deleteApp(@PathVariable("username") String username, HttpServletResponse response)
focal_method.body: @PreAuthorize("hasRole('ROLE_ADMIN')")
  	@RequestMapping(value = "/app", method = RequestMethod.GET)
  	@ResponseBody
  	public List<OadrAppDto> listApp() {
  
  		List<OadrApp> find = oadrAppService.findAll();
  		return dtoMapper.mapList(find, OadrAppDto.class);
  	}
focal_method.class_method_signature: AccountController.listApp()
focal_method.full_signature: @PreAuthorize("hasRole('ROLE_ADMIN')") @RequestMapping(value = "/app", method = RequestMethod.GET) @ResponseBody public List<OadrAppDto> listApp()
focal_method.identifier: listApp
focal_method.invocations: findAll mapList
focal_method.modifiers: @PreAuthorize("hasRole('ROLE_ADMIN')") @RequestMapping(value = "/app", method = RequestMethod.GET) @ResponseBody public
focal_method.parameters: ()
focal_method.return: List<OadrAppDto>
focal_method.signature: List<OadrAppDto> listApp()