test_class.declarator: subscriptionService = new SubscriptionService()
test_class.modifier: @InjectMocks
      private final
test_class.original_string: @InjectMocks
      private final SubscriptionService subscriptionService = new SubscriptionService();
test_class.type: SubscriptionService
test_class.var_name: subscriptionService
test_class.declarator: seyrenRepository
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private SeyrenRepository seyrenRepository;
test_class.type: SeyrenRepository
test_class.var_name: seyrenRepository
test_class.file: services/src/test/java/com/vsct/supervision/notification/service/SubscriptionServiceTest.java
test_class.identifier: SubscriptionServiceTest
test_case.body: @Test
      public void searchNonExistentSubscription() {
          Subscription fakeSub = TestUtils.getDefaultSubscription();
          fakeSub.setToTime("2333");
          fakeSub.setFromTime("0123");
          Subscription s = subscriptionService.searchSubscription(fakeSub, TestUtils.DEFAULT_ALARM_ID);
          assertNull(s);
      }
test_case.class_method_signature: SubscriptionServiceTest.searchNonExistentSubscription()
test_case.full_signature: @Test public void searchNonExistentSubscription()
test_case.identifier: searchNonExistentSubscription
test_case.invocations: getDefaultSubscription setToTime setFromTime searchSubscription assertNull
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void searchNonExistentSubscription()
focal_class.declarator: LOGGER = LoggerFactory.getLogger(SubscriptionService.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = LoggerFactory.getLogger(SubscriptionService.class);
focal_class.type: Logger
focal_class.var_name: LOGGER
focal_class.declarator: seyrenRepository
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private SeyrenRepository seyrenRepository;
focal_class.type: SeyrenRepository
focal_class.var_name: seyrenRepository
focal_class.file: services/src/main/java/com/vsct/supervision/notification/service/SubscriptionService.java
focal_class.identifier: SubscriptionService
focal_class.class_method_signature: SubscriptionService.getSubscription(String alarmId, String subscriptionId)
focal_class.full_signature: public Subscription getSubscription(String alarmId, String subscriptionId)
focal_class.identifier: getSubscription
focal_class.modifiers: public
focal_class.parameters: (String alarmId, String subscriptionId)
focal_class.return: Subscription
focal_class.signature: Subscription getSubscription(String alarmId, String subscriptionId)
focal_class.class_method_signature: SubscriptionService.addSubscription(Subscription subscription, String alarmId)
focal_class.full_signature: public void addSubscription(Subscription subscription, String alarmId)
focal_class.identifier: addSubscription
focal_class.modifiers: public
focal_class.parameters: (Subscription subscription, String alarmId)
focal_class.return: void
focal_class.signature: void addSubscription(Subscription subscription, String alarmId)
focal_class.class_method_signature: SubscriptionService.searchSubscription(Subscription subscription, String alarmId)
focal_class.full_signature: public Subscription searchSubscription(Subscription subscription, String alarmId)
focal_class.identifier: searchSubscription
focal_class.modifiers: public
focal_class.parameters: (Subscription subscription, String alarmId)
focal_class.return: Subscription
focal_class.signature: Subscription searchSubscription(Subscription subscription, String alarmId)
focal_class.class_method_signature: SubscriptionService.updateSubscription(Subscription subscription, String alarmId)
focal_class.full_signature: public void updateSubscription(Subscription subscription, String alarmId)
focal_class.identifier: updateSubscription
focal_class.modifiers: public
focal_class.parameters: (Subscription subscription, String alarmId)
focal_class.return: void
focal_class.signature: void updateSubscription(Subscription subscription, String alarmId)
focal_class.class_method_signature: SubscriptionService.validateSubscription(Subscription subscription)
focal_class.full_signature: private void validateSubscription(Subscription subscription)
focal_class.identifier: validateSubscription
focal_class.modifiers: private
focal_class.parameters: (Subscription subscription)
focal_class.return: void
focal_class.signature: void validateSubscription(Subscription subscription)
focal_class.class_method_signature: SubscriptionService.validateUpdateSubscription(Subscription current, Subscription updated)
focal_class.full_signature: private void validateUpdateSubscription(Subscription current, Subscription updated)
focal_class.identifier: validateUpdateSubscription
focal_class.modifiers: private
focal_class.parameters: (Subscription current, Subscription updated)
focal_class.return: void
focal_class.signature: void validateUpdateSubscription(Subscription current, Subscription updated)
focal_class.class_method_signature: SubscriptionService.isLastSubscriptionActiveToDisable(Subscription current, Subscription updated, Alarm alarm)
focal_class.full_signature: private boolean isLastSubscriptionActiveToDisable(Subscription current, Subscription updated, Alarm alarm)
focal_class.identifier: isLastSubscriptionActiveToDisable
focal_class.modifiers: private
focal_class.parameters: (Subscription current, Subscription updated, Alarm alarm)
focal_class.return: boolean
focal_class.signature: boolean isLastSubscriptionActiveToDisable(Subscription current, Subscription updated, Alarm alarm)
focal_class.class_method_signature: SubscriptionService.deleteSubscription(String alarmId, String subscriptionId)
focal_class.full_signature: public SubscriptionService.DeletedSubscriptionStatus deleteSubscription(String alarmId, String subscriptionId)
focal_class.identifier: deleteSubscription
focal_class.modifiers: public
focal_class.parameters: (String alarmId, String subscriptionId)
focal_class.return: SubscriptionService.DeletedSubscriptionStatus
focal_class.signature: SubscriptionService.DeletedSubscriptionStatus deleteSubscription(String alarmId, String subscriptionId)
focal_method.body: public Subscription searchSubscription(Subscription subscription, String alarmId) {
          LOGGER.debug("Searched identical subscription to: {}", subscription);
  
          Alarm alarm = seyrenRepository.getAlarm(alarmId);
  
          return alarm.getSubscriptions().stream().filter(s -> s.equals(subscription)).findAny().orElse(null);
      }
focal_method.class_method_signature: SubscriptionService.searchSubscription(Subscription subscription, String alarmId)
focal_method.full_signature: public Subscription searchSubscription(Subscription subscription, String alarmId)
focal_method.identifier: searchSubscription
focal_method.invocations: debug getAlarm orElse findAny filter stream getSubscriptions equals
focal_method.modifiers: public
focal_method.parameters: (Subscription subscription, String alarmId)
focal_method.return: Subscription
focal_method.signature: Subscription searchSubscription(Subscription subscription, String alarmId)