### Question:
CSourceSubscriptionService { public URI subscribe(SubscriptionRequest subscriptionRequest) throws ResponseException { return subscribe(subscriptionRequest, true); } CSourceSubscriptionService(CSourceProducerChannel producerChannel); Subscription querySubscription(URI id); URI subscribe(SubscriptionRequest subscriptionRequest); URI subscribe(SubscriptionRequest subscriptionRequest, boolean sync); boolean unsubscribe(URI id); Subscription updateSubscription(Subscription subscription); List<Subscription> getAllSubscriptions(int limit); Subscription getSubscription(URI subscriptionId); void checkSubscriptions(CSourceRegistration cSourceRegistration, TriggerReason triggerReason); @KafkaListener(topics = "${submanager.subscription.topic}", groupId = "csourcemanager") void handleInternalSub(Message<byte[]> message); boolean checkSubscriptions(CSourceRegistration prevCSourceRegistration,
			CSourceRegistration newCSourceRegistration);  }### Answer:
@Test public void subscribeTest() { try { Mockito.doReturn(true).when(operations).isMessageExists(any(), any()); URI uri=csourceSubs.subscribe(new SubscriptionRequest(subs, null)); Assert.assertEquals(uri, new URI("urn:ngsi-ld:Subscription:7")); }catch(Exception ex) { Assert.fail(); } }