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: localRegistrations
test_class.modifier: @Mock
test_class.original_string: @Mock
      LocalRegistrations localRegistrations;
test_class.type: LocalRegistrations
test_class.var_name: localRegistrations
test_class.declarator: subscriptions
test_class.modifier: @Mock
test_class.original_string: @Mock
      Subscriptions subscriptions;
test_class.type: Subscriptions
test_class.var_name: subscriptions
test_class.declarator: ngsiClient
test_class.modifier: @Mock
test_class.original_string: @Mock
      NgsiClient ngsiClient;
test_class.type: NgsiClient
test_class.var_name: ngsiClient
test_class.declarator: configuration
test_class.modifier: @Mock
test_class.original_string: @Mock
      Configuration configuration;
test_class.type: Configuration
test_class.var_name: configuration
test_class.declarator: providingApplication
test_class.modifier: @Mock
test_class.original_string: @Mock
      Iterator<URI> providingApplication;
test_class.type: Iterator<URI>
test_class.var_name: providingApplication
test_class.declarator: matchedSubscriptions
test_class.modifier: @Mock
test_class.original_string: @Mock
      Iterator<Subscription> matchedSubscriptions;
test_class.type: Iterator<Subscription>
test_class.var_name: matchedSubscriptions
test_class.declarator: updateContextResponseListenableFuture
test_class.modifier: @Mock
test_class.original_string: @Mock
      ListenableFuture<UpdateContextResponse> updateContextResponseListenableFuture;
test_class.type: ListenableFuture<UpdateContextResponse>
test_class.var_name: updateContextResponseListenableFuture
test_class.declarator: queryContextResponseListenableFuture
test_class.modifier: @Mock
test_class.original_string: @Mock
      ListenableFuture<QueryContextResponse> queryContextResponseListenableFuture;
test_class.type: ListenableFuture<QueryContextResponse>
test_class.var_name: queryContextResponseListenableFuture
test_class.declarator: notifyContextResponseListenableFuture
test_class.modifier: @Mock
test_class.original_string: @Mock
      ListenableFuture<NotifyContextResponse> notifyContextResponseListenableFuture;
test_class.type: ListenableFuture<NotifyContextResponse>
test_class.var_name: notifyContextResponseListenableFuture
test_class.declarator: webApplicationContext
test_class.modifier: @Autowired
      private
test_class.original_string: @Autowired
      private WebApplicationContext webApplicationContext;
test_class.type: WebApplicationContext
test_class.var_name: webApplicationContext
test_class.declarator: mapper
test_class.modifier: @Autowired
      private
test_class.original_string: @Autowired
      private MappingJackson2HttpMessageConverter mapper;
test_class.type: MappingJackson2HttpMessageConverter
test_class.var_name: mapper
test_class.declarator: attributeArgumentCaptor
test_class.modifier: @Captor
      private
test_class.original_string: @Captor
      private ArgumentCaptor<Set<String>> attributeArgumentCaptor;
test_class.type: ArgumentCaptor<Set<String>>
test_class.var_name: attributeArgumentCaptor
test_class.declarator: entityIdArgumentCaptor
test_class.modifier: @Captor
      private
test_class.original_string: @Captor
      private ArgumentCaptor<EntityId> entityIdArgumentCaptor;
test_class.type: ArgumentCaptor<EntityId>
test_class.var_name: entityIdArgumentCaptor
test_class.declarator: ngsiController
test_class.modifier: @InjectMocks
      @Autowired
      private
test_class.original_string: @InjectMocks
      @Autowired
      private NgsiController ngsiController;
test_class.type: NgsiController
test_class.var_name: ngsiController
test_class.declarator: httpHeaders = new HttpHeaders()
test_class.modifier: private
test_class.original_string: private HttpHeaders httpHeaders = new HttpHeaders();
test_class.type: HttpHeaders
test_class.var_name: httpHeaders
test_class.file: cepheus-broker/src/test/java/com/orange/cepheus/broker/controller/NgsiControllerTest.java
test_class.identifier: NgsiControllerTest
test_case.body: @Test
      public void postNewRegisterContext() throws Exception {
  
          when(localRegistrations.updateRegistrationContext(any())).thenReturn("12345678");
          ListenableFuture<RegisterContextResponse> responseFuture = Mockito.mock(ListenableFuture.class);
          doNothing().when(responseFuture).addCallback(any(), any());
          when(ngsiClient.registerContext(any(), eq(null), any())).thenReturn(responseFuture);
  
          mockMvc.perform(post("/v1/registerContext")
                  .content(json(mapper, createRegisterContextTemperature()))
                  .contentType(MediaType.APPLICATION_JSON))
                  .andExpect(status().isOk())
                  .andExpect(MockMvcResultMatchers.jsonPath("$.registrationId").value("12345678"));
      }
test_case.class_method_signature: NgsiControllerTest.postNewRegisterContext()
test_case.full_signature: @Test public void postNewRegisterContext()
test_case.identifier: postNewRegisterContext
test_case.invocations: thenReturn when updateRegistrationContext any mock addCallback when doNothing any any thenReturn when registerContext any eq any andExpect andExpect perform contentType content post json createRegisterContextTemperature isOk status value jsonPath
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void postNewRegisterContext()
focal_class.declarator: logger = LoggerFactory.getLogger(NgsiController.class)
focal_class.modifier: private static
focal_class.original_string: private static Logger logger = LoggerFactory.getLogger(NgsiController.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: localRegistrations
focal_class.modifier: @Autowired
focal_class.original_string: @Autowired
      LocalRegistrations localRegistrations;
focal_class.type: LocalRegistrations
focal_class.var_name: localRegistrations
focal_class.declarator: subscriptions
focal_class.modifier: @Autowired
focal_class.original_string: @Autowired
      Subscriptions subscriptions;
focal_class.type: Subscriptions
focal_class.var_name: subscriptions
focal_class.declarator: ngsiClient
focal_class.modifier: @Autowired
focal_class.original_string: @Autowired
      NgsiClient ngsiClient;
focal_class.type: NgsiClient
focal_class.var_name: ngsiClient
focal_class.declarator: configuration
focal_class.modifier: @Autowired
focal_class.original_string: @Autowired
      Configuration configuration;
focal_class.type: Configuration
focal_class.var_name: configuration
focal_class.file: cepheus-broker/src/main/java/com/orange/cepheus/broker/controller/NgsiController.java
focal_class.identifier: NgsiController
focal_class.class_method_signature: NgsiController.registerContext(final RegisterContext register)
focal_class.full_signature: @Override public RegisterContextResponse registerContext(final RegisterContext register)
focal_class.identifier: registerContext
focal_class.modifiers: @Override public
focal_class.parameters: (final RegisterContext register)
focal_class.return: RegisterContextResponse
focal_class.signature: RegisterContextResponse registerContext(final RegisterContext register)
focal_class.class_method_signature: NgsiController.updateContext(final UpdateContext update)
focal_class.full_signature: @Override public UpdateContextResponse updateContext(final UpdateContext update)
focal_class.identifier: updateContext
focal_class.modifiers: @Override public
focal_class.parameters: (final UpdateContext update)
focal_class.return: UpdateContextResponse
focal_class.signature: UpdateContextResponse updateContext(final UpdateContext update)
focal_class.class_method_signature: NgsiController.queryContext(final QueryContext query)
focal_class.full_signature: @Override public QueryContextResponse queryContext(final QueryContext query)
focal_class.identifier: queryContext
focal_class.modifiers: @Override public
focal_class.parameters: (final QueryContext query)
focal_class.return: QueryContextResponse
focal_class.signature: QueryContextResponse queryContext(final QueryContext query)
focal_class.class_method_signature: NgsiController.subscribeContext(final SubscribeContext subscribe)
focal_class.full_signature: @Override public SubscribeContextResponse subscribeContext(final SubscribeContext subscribe)
focal_class.identifier: subscribeContext
focal_class.modifiers: @Override public
focal_class.parameters: (final SubscribeContext subscribe)
focal_class.return: SubscribeContextResponse
focal_class.signature: SubscribeContextResponse subscribeContext(final SubscribeContext subscribe)
focal_class.class_method_signature: NgsiController.updateContextSubscription(final UpdateContextSubscription updateContextSubscription)
focal_class.full_signature: @Override public UpdateContextSubscriptionResponse updateContextSubscription(final UpdateContextSubscription updateContextSubscription)
focal_class.identifier: updateContextSubscription
focal_class.modifiers: @Override public
focal_class.parameters: (final UpdateContextSubscription updateContextSubscription)
focal_class.return: UpdateContextSubscriptionResponse
focal_class.signature: UpdateContextSubscriptionResponse updateContextSubscription(final UpdateContextSubscription updateContextSubscription)
focal_class.class_method_signature: NgsiController.unsubscribeContext(final UnsubscribeContext unsubscribe)
focal_class.full_signature: @Override public UnsubscribeContextResponse unsubscribeContext(final UnsubscribeContext unsubscribe)
focal_class.identifier: unsubscribeContext
focal_class.modifiers: @Override public
focal_class.parameters: (final UnsubscribeContext unsubscribe)
focal_class.return: UnsubscribeContextResponse
focal_class.signature: UnsubscribeContextResponse unsubscribeContext(final UnsubscribeContext unsubscribe)
focal_class.class_method_signature: NgsiController.registrationExceptionHandler(HttpServletRequest req, RegistrationException registrationException)
focal_class.full_signature: @ExceptionHandler(RegistrationException.class) public ResponseEntity<Object> registrationExceptionHandler(HttpServletRequest req, RegistrationException registrationException)
focal_class.identifier: registrationExceptionHandler
focal_class.modifiers: @ExceptionHandler(RegistrationException.class) public
focal_class.parameters: (HttpServletRequest req, RegistrationException registrationException)
focal_class.return: ResponseEntity<Object>
focal_class.signature: ResponseEntity<Object> registrationExceptionHandler(HttpServletRequest req, RegistrationException registrationException)
focal_class.class_method_signature: NgsiController.missingRemoteBrokerExceptionHandler(HttpServletRequest req, MissingRemoteBrokerException missingRemoteBrokerException)
focal_class.full_signature: @ExceptionHandler(MissingRemoteBrokerException.class) public ResponseEntity<Object> missingRemoteBrokerExceptionHandler(HttpServletRequest req, MissingRemoteBrokerException missingRemoteBrokerException)
focal_class.identifier: missingRemoteBrokerExceptionHandler
focal_class.modifiers: @ExceptionHandler(MissingRemoteBrokerException.class) public
focal_class.parameters: (HttpServletRequest req, MissingRemoteBrokerException missingRemoteBrokerException)
focal_class.return: ResponseEntity<Object>
focal_class.signature: ResponseEntity<Object> missingRemoteBrokerExceptionHandler(HttpServletRequest req, MissingRemoteBrokerException missingRemoteBrokerException)
focal_class.class_method_signature: NgsiController.subscriptionExceptionHandler(HttpServletRequest req, SubscriptionException subscriptionException)
focal_class.full_signature: @ExceptionHandler(SubscriptionException.class) public ResponseEntity<Object> subscriptionExceptionHandler(HttpServletRequest req, SubscriptionException subscriptionException)
focal_class.identifier: subscriptionExceptionHandler
focal_class.modifiers: @ExceptionHandler(SubscriptionException.class) public
focal_class.parameters: (HttpServletRequest req, SubscriptionException subscriptionException)
focal_class.return: ResponseEntity<Object>
focal_class.signature: ResponseEntity<Object> subscriptionExceptionHandler(HttpServletRequest req, SubscriptionException subscriptionException)
focal_class.class_method_signature: NgsiController.subscriptionPersistenceExceptionHandler(HttpServletRequest req, SubscriptionPersistenceException subscriptionPersistenceException)
focal_class.full_signature: @ExceptionHandler(SubscriptionPersistenceException.class) public ResponseEntity<Object> subscriptionPersistenceExceptionHandler(HttpServletRequest req, SubscriptionPersistenceException subscriptionPersistenceException)
focal_class.identifier: subscriptionPersistenceExceptionHandler
focal_class.modifiers: @ExceptionHandler(SubscriptionPersistenceException.class) public
focal_class.parameters: (HttpServletRequest req, SubscriptionPersistenceException subscriptionPersistenceException)
focal_class.return: ResponseEntity<Object>
focal_class.signature: ResponseEntity<Object> subscriptionPersistenceExceptionHandler(HttpServletRequest req, SubscriptionPersistenceException subscriptionPersistenceException)
focal_class.class_method_signature: NgsiController.registrationPersistenceExceptionHandler(HttpServletRequest req, RegistrationPersistenceException registrationPersistenceException)
focal_class.full_signature: @ExceptionHandler(RegistrationPersistenceException.class) public ResponseEntity<Object> registrationPersistenceExceptionHandler(HttpServletRequest req, RegistrationPersistenceException registrationPersistenceException)
focal_class.identifier: registrationPersistenceExceptionHandler
focal_class.modifiers: @ExceptionHandler(RegistrationPersistenceException.class) public
focal_class.parameters: (HttpServletRequest req, RegistrationPersistenceException registrationPersistenceException)
focal_class.return: ResponseEntity<Object>
focal_class.signature: ResponseEntity<Object> registrationPersistenceExceptionHandler(HttpServletRequest req, RegistrationPersistenceException registrationPersistenceException)
focal_class.class_method_signature: NgsiController.getRemoteBrokerHeaders(String brokerUrl)
focal_class.full_signature: private HttpHeaders getRemoteBrokerHeaders(String brokerUrl)
focal_class.identifier: getRemoteBrokerHeaders
focal_class.modifiers: private
focal_class.parameters: (String brokerUrl)
focal_class.return: HttpHeaders
focal_class.signature: HttpHeaders getRemoteBrokerHeaders(String brokerUrl)
focal_class.class_method_signature: NgsiController.logUpdateContextResponse(UpdateContextResponse updateContextResponse, String brokerUrl)
focal_class.full_signature: private void logUpdateContextResponse(UpdateContextResponse updateContextResponse, String brokerUrl)
focal_class.identifier: logUpdateContextResponse
focal_class.modifiers: private
focal_class.parameters: (UpdateContextResponse updateContextResponse, String brokerUrl)
focal_class.return: void
focal_class.signature: void logUpdateContextResponse(UpdateContextResponse updateContextResponse, String brokerUrl)
focal_class.class_method_signature: NgsiController.logNotifyContextResponse(NotifyContextResponse notifyContextResponse, String providerUrl)
focal_class.full_signature: private void logNotifyContextResponse(NotifyContextResponse notifyContextResponse, String providerUrl)
focal_class.identifier: logNotifyContextResponse
focal_class.modifiers: private
focal_class.parameters: (NotifyContextResponse notifyContextResponse, String providerUrl)
focal_class.return: void
focal_class.signature: void logNotifyContextResponse(NotifyContextResponse notifyContextResponse, String providerUrl)
focal_class.superclass: extends NgsiBaseController
focal_method.body: @Override
      public RegisterContextResponse registerContext(final RegisterContext register) throws RegistrationException, RegistrationPersistenceException {
          logger.debug("<= registerContext with id:{} duration:{}", register.getRegistrationId(), register.getDuration());
  
          RegisterContextResponse registerContextLocalResponse = new RegisterContextResponse();
          //register new registration or update previous registration (if registrationId != null) or remove registration (if duration = 0)
          registerContextLocalResponse.setRegistrationId(localRegistrations.updateRegistrationContext(register));
  
          return registerContextLocalResponse;
      }
focal_method.class_method_signature: NgsiController.registerContext(final RegisterContext register)
focal_method.full_signature: @Override public RegisterContextResponse registerContext(final RegisterContext register)
focal_method.identifier: registerContext
focal_method.invocations: debug etRegistrationId( etDuration( setRegistrationId updateRegistrationContext
focal_method.modifiers: @Override public
focal_method.parameters: (final RegisterContext register)
focal_method.return: RegisterContextResponse
focal_method.signature: RegisterContextResponse registerContext(final RegisterContext register)