test_class.declarator: namespaceRestController
test_class.modifier: @InjectMocks
      private
test_class.original_string: @InjectMocks
      private NamespaceRestController namespaceRestController;
test_class.type: NamespaceRestController
test_class.var_name: namespaceRestController
test_class.declarator: namespaceService
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private NamespaceService namespaceService;
test_class.type: NamespaceService
test_class.var_name: namespaceService
test_class.file: herd-code/herd-rest/src/test/java/org/finra/herd/rest/NamespaceRestControllerTest.java
test_class.identifier: NamespaceRestControllerTest
test_class.superclass: extends AbstractRestTest
test_case.body: @Test
      public void testCreateNamespace() throws Exception
      {
          NamespaceCreateRequest request = namespaceServiceTestHelper.createNamespaceCreateRequest(NAMESPACE);
          Namespace namespace = new Namespace(NAMESPACE);
          when(namespaceService.createNamespace(request)).thenReturn(namespace);
          // Create a namespace.
          Namespace resultNamespace = namespaceRestController.createNamespace(request);
  
          // Validate the returned object.
          namespaceServiceTestHelper.validateNamespace(NAMESPACE, resultNamespace);
  
          // Verify the external calls.
          verify(namespaceService).createNamespace(request);
          verifyNoMoreInteractions(namespaceService);
          // Validate the returned object.
          assertEquals(namespace, resultNamespace);
      }
test_case.class_method_signature: NamespaceRestControllerTest.testCreateNamespace()
test_case.full_signature: @Test public void testCreateNamespace()
test_case.identifier: testCreateNamespace
test_case.invocations: createNamespaceCreateRequest thenReturn when createNamespace createNamespace validateNamespace createNamespace verify verifyNoMoreInteractions assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testCreateNamespace()
focal_class.declarator: namespaceService
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private NamespaceService namespaceService;
focal_class.type: NamespaceService
focal_class.var_name: namespaceService
focal_class.file: herd-code/herd-rest/src/main/java/org/finra/herd/rest/NamespaceRestController.java
focal_class.identifier: NamespaceRestController
focal_class.class_method_signature: NamespaceRestController.createNamespace(@RequestBody NamespaceCreateRequest request)
focal_class.full_signature: @RequestMapping(value = "/namespaces", method = RequestMethod.POST, consumes = {"application/xml", "application/json"}) @Secured(SecurityFunctions.FN_NAMESPACES_POST) public Namespace createNamespace(@RequestBody NamespaceCreateRequest request)
focal_class.identifier: createNamespace
focal_class.modifiers: @RequestMapping(value = "/namespaces", method = RequestMethod.POST, consumes = {"application/xml", "application/json"}) @Secured(SecurityFunctions.FN_NAMESPACES_POST) public
focal_class.parameters: (@RequestBody NamespaceCreateRequest request)
focal_class.return: Namespace
focal_class.signature: Namespace createNamespace(@RequestBody NamespaceCreateRequest request)
focal_class.class_method_signature: NamespaceRestController.getNamespace(@PathVariable("namespaceCode") String namespaceCode)
focal_class.full_signature: @RequestMapping(value = "/namespaces/{namespaceCode}", method = RequestMethod.GET) @Secured(SecurityFunctions.FN_NAMESPACES_GET) public Namespace getNamespace(@PathVariable("namespaceCode") String namespaceCode)
focal_class.identifier: getNamespace
focal_class.modifiers: @RequestMapping(value = "/namespaces/{namespaceCode}", method = RequestMethod.GET) @Secured(SecurityFunctions.FN_NAMESPACES_GET) public
focal_class.parameters: (@PathVariable("namespaceCode") String namespaceCode)
focal_class.return: Namespace
focal_class.signature: Namespace getNamespace(@PathVariable("namespaceCode") String namespaceCode)
focal_class.class_method_signature: NamespaceRestController.deleteNamespace(@PathVariable("namespaceCode") String namespaceCode)
focal_class.full_signature: @RequestMapping(value = "/namespaces/{namespaceCode}", method = RequestMethod.DELETE) @Secured(SecurityFunctions.FN_NAMESPACES_DELETE) public Namespace deleteNamespace(@PathVariable("namespaceCode") String namespaceCode)
focal_class.identifier: deleteNamespace
focal_class.modifiers: @RequestMapping(value = "/namespaces/{namespaceCode}", method = RequestMethod.DELETE) @Secured(SecurityFunctions.FN_NAMESPACES_DELETE) public
focal_class.parameters: (@PathVariable("namespaceCode") String namespaceCode)
focal_class.return: Namespace
focal_class.signature: Namespace deleteNamespace(@PathVariable("namespaceCode") String namespaceCode)
focal_class.class_method_signature: NamespaceRestController.getNamespaces()
focal_class.full_signature: @RequestMapping(value = "/namespaces", method = RequestMethod.GET) @Secured(SecurityFunctions.FN_NAMESPACES_ALL_GET) public NamespaceKeys getNamespaces()
focal_class.identifier: getNamespaces
focal_class.modifiers: @RequestMapping(value = "/namespaces", method = RequestMethod.GET) @Secured(SecurityFunctions.FN_NAMESPACES_ALL_GET) public
focal_class.parameters: ()
focal_class.return: NamespaceKeys
focal_class.signature: NamespaceKeys getNamespaces()
focal_method.body: @RequestMapping(value = "/namespaces", method = RequestMethod.POST, consumes = {"application/xml", "application/json"})
      @Secured(SecurityFunctions.FN_NAMESPACES_POST)
      public Namespace createNamespace(@RequestBody NamespaceCreateRequest request)
      {
          return namespaceService.createNamespace(request);
      }
focal_method.class_method_signature: NamespaceRestController.createNamespace(@RequestBody NamespaceCreateRequest request)
focal_method.full_signature: @RequestMapping(value = "/namespaces", method = RequestMethod.POST, consumes = {"application/xml", "application/json"}) @Secured(SecurityFunctions.FN_NAMESPACES_POST) public Namespace createNamespace(@RequestBody NamespaceCreateRequest request)
focal_method.identifier: createNamespace
focal_method.invocations: createNamespace
focal_method.modifiers: @RequestMapping(value = "/namespaces", method = RequestMethod.POST, consumes = {"application/xml", "application/json"}) @Secured(SecurityFunctions.FN_NAMESPACES_POST) public
focal_method.parameters: (@RequestBody NamespaceCreateRequest request)
focal_method.return: Namespace
focal_method.signature: Namespace createNamespace(@RequestBody NamespaceCreateRequest request)