test_class.declarator: ADDRESS_UUID = "cd6c9ae2-f689-46f1-abff-7feab13c270E"
test_class.modifier: private static final
test_class.original_string: private static final String ADDRESS_UUID = "cd6c9ae2-f689-46f1-abff-7feab13c270E";
test_class.type: String
test_class.var_name: ADDRESS_UUID
test_class.declarator: ADDRESS_UUID_FROM_OTHER = "19448a89-3496-43e9-9b3e-22e14c2285b7"
test_class.modifier: private static final
test_class.original_string: private static final String ADDRESS_UUID_FROM_OTHER = "19448a89-3496-43e9-9b3e-22e14c2285b7";
test_class.type: String
test_class.var_name: ADDRESS_UUID_FROM_OTHER
test_class.declarator: NOT_EXIST_CLIENT = "NOT_EXIST"
test_class.modifier: private static final
test_class.original_string: private static final String NOT_EXIST_CLIENT = "NOT_EXIST";
test_class.type: String
test_class.var_name: NOT_EXIST_CLIENT
test_class.declarator: REST_CLIENT = "rest"
test_class.modifier: private static final
test_class.original_string: private static final String REST_CLIENT = "rest";
test_class.type: String
test_class.var_name: REST_CLIENT
test_class.declarator: OTHER_CLIENT = "other"
test_class.modifier: private static final
test_class.original_string: private static final String OTHER_CLIENT = "other";
test_class.type: String
test_class.var_name: OTHER_CLIENT
test_class.declarator: CLIENT_WITH_DIFFERENT_PATTERN = "DIFFERENT_PATTERN"
test_class.modifier: private static final
test_class.original_string: private static final String CLIENT_WITH_DIFFERENT_PATTERN = "DIFFERENT_PATTERN";
test_class.type: String
test_class.var_name: CLIENT_WITH_DIFFERENT_PATTERN
test_class.declarator: ADDRESS_UUID_FROM_DIFFERENT_CLIENT = "2f6856ff-5668-40ec-88d5-1b735d52f9a7"
test_class.modifier: private static final
test_class.original_string: private static final String ADDRESS_UUID_FROM_DIFFERENT_CLIENT = "2f6856ff-5668-40ec-88d5-1b735d52f9a7";
test_class.type: String
test_class.var_name: ADDRESS_UUID_FROM_DIFFERENT_CLIENT
test_class.declarator: eventConfigurationMapper
test_class.modifier: @Spy
  	private
test_class.original_string: @Spy
  	private AtomfeedEventConfigurationMapperImpl eventConfigurationMapper;
test_class.type: AtomfeedEventConfigurationMapperImpl
test_class.var_name: eventConfigurationMapper
test_class.declarator: atomFeedEventConfigurationService
test_class.modifier: @InjectMocks
  	private
test_class.original_string: @InjectMocks
  	private AtomfeedEventConfigurationServiceImpl atomFeedEventConfigurationService;
test_class.type: AtomfeedEventConfigurationServiceImpl
test_class.var_name: atomFeedEventConfigurationService
test_class.declarator: feedConfigurationService
test_class.modifier: @Mock
  	private
test_class.original_string: @Mock
  	private FeedConfigurationService feedConfigurationService;
test_class.type: FeedConfigurationService
test_class.var_name: feedConfigurationService
test_class.file: api/src/test/java/org/openmrs/module/sync2/api/service/impl/atomfeed/AtomfeedEventConfigurationServiceImplTest.java
test_class.identifier: AtomfeedEventConfigurationServiceImplTest
test_case.body: @Test
  	public void extractUuidFromResourceLinks_shouldExtractUuidFromPreferredClient() {
  		String category = CategoryEnum.PERSON_ADDRESS.getCategory();
  		Mockito.when(feedConfigurationService.getFeedConfigurationByCategory(category))
  				.thenReturn(createPersonAddressFeedConfiguration(true));
  
  		String uuid = atomFeedEventConfigurationService.extractUuidFromResourceLinks(
  				createResourceLinks(true), category, OTHER_CLIENT);
  
  		Assert.assertNotNull(uuid);
  		Assert.assertEquals(ADDRESS_UUID_FROM_OTHER, uuid);
  	}
test_case.class_method_signature: AtomfeedEventConfigurationServiceImplTest.extractUuidFromResourceLinks_shouldExtractUuidFromPreferredClient()
test_case.full_signature: @Test public void extractUuidFromResourceLinks_shouldExtractUuidFromPreferredClient()
test_case.identifier: extractUuidFromResourceLinks_shouldExtractUuidFromPreferredClient
test_case.invocations: getCategory thenReturn when getFeedConfigurationByCategory createPersonAddressFeedConfiguration extractUuidFromResourceLinks createResourceLinks assertNotNull assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void extractUuidFromResourceLinks_shouldExtractUuidFromPreferredClient()
focal_class.declarator: OBJECT_UUID_PATTERN = "{uuid}"
focal_class.modifier: private static final
focal_class.original_string: private static final String OBJECT_UUID_PATTERN = "{uuid}";
focal_class.type: String
focal_class.var_name: OBJECT_UUID_PATTERN
focal_class.declarator: UUID_PATTERN = "\\b[0-9a-f]{8}\\b-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-\\b[0-9a-f]{12}\\b"
focal_class.modifier: private static final
focal_class.original_string: private static final String UUID_PATTERN = "\\b[0-9a-f]{8}\\b-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-\\b[0-9a-f]{12}\\b";
focal_class.type: String
focal_class.var_name: UUID_PATTERN
focal_class.declarator: feedConfigurationService
focal_class.modifier: @Autowired
  	@Qualifier("atomfeed.feedConfigurationService")
  	private
focal_class.original_string: @Autowired
  	@Qualifier("atomfeed.feedConfigurationService")
  	private FeedConfigurationService feedConfigurationService;
focal_class.type: FeedConfigurationService
focal_class.var_name: feedConfigurationService
focal_class.declarator: eventConfigurationMapper
focal_class.modifier: @Autowired
  	@Qualifier("sync2.eventConfigurationMapper.atomfeed")
  	private
focal_class.original_string: @Autowired
  	@Qualifier("sync2.eventConfigurationMapper.atomfeed")
  	private EventConfigurationMapper<FeedConfiguration> eventConfigurationMapper;
focal_class.type: EventConfigurationMapper<FeedConfiguration>
focal_class.var_name: eventConfigurationMapper
focal_class.file: api/src/main/java/org/openmrs/module/sync2/api/service/impl/atomfeed/AtomfeedEventConfigurationServiceImpl.java
focal_class.identifier: AtomfeedEventConfigurationServiceImpl
focal_class.interfaces: implements EventConfigurationService
focal_class.class_method_signature: AtomfeedEventConfigurationServiceImpl.getEventConfigurationByCategory(SyncCategory categoryEnum)
focal_class.full_signature: @Override public EventConfiguration getEventConfigurationByCategory(SyncCategory categoryEnum)
focal_class.identifier: getEventConfigurationByCategory
focal_class.modifiers: @Override public
focal_class.parameters: (SyncCategory categoryEnum)
focal_class.return: EventConfiguration
focal_class.signature: EventConfiguration getEventConfigurationByCategory(SyncCategory categoryEnum)
focal_class.class_method_signature: AtomfeedEventConfigurationServiceImpl.extractUuidFromResourceLinks(Map<String, String> eventResourceLinks, String eventCategory,
  			String preferredClient)
focal_class.full_signature: @Override public String extractUuidFromResourceLinks(Map<String, String> eventResourceLinks, String eventCategory,
  			String preferredClient)
focal_class.identifier: extractUuidFromResourceLinks
focal_class.modifiers: @Override public
focal_class.parameters: (Map<String, String> eventResourceLinks, String eventCategory,
  			String preferredClient)
focal_class.return: String
focal_class.signature: String extractUuidFromResourceLinks(Map<String, String> eventResourceLinks, String eventCategory,
  			String preferredClient)
focal_class.class_method_signature: AtomfeedEventConfigurationServiceImpl.extractBasedOnLinkTemplates(Map<String, String> eventResourceLinks, String eventCategory,
  			String preferredClient)
focal_class.full_signature: private String extractBasedOnLinkTemplates(Map<String, String> eventResourceLinks, String eventCategory,
  			String preferredClient)
focal_class.identifier: extractBasedOnLinkTemplates
focal_class.modifiers: private
focal_class.parameters: (Map<String, String> eventResourceLinks, String eventCategory,
  			String preferredClient)
focal_class.return: String
focal_class.signature: String extractBasedOnLinkTemplates(Map<String, String> eventResourceLinks, String eventCategory,
  			String preferredClient)
focal_class.class_method_signature: AtomfeedEventConfigurationServiceImpl.extractFromFirstMatchingTemplates(Map<String, String> eventResourceLinks, Map<String, String> linkTemplates)
focal_class.full_signature: private String extractFromFirstMatchingTemplates(Map<String, String> eventResourceLinks, Map<String, String> linkTemplates)
focal_class.identifier: extractFromFirstMatchingTemplates
focal_class.modifiers: private
focal_class.parameters: (Map<String, String> eventResourceLinks, Map<String, String> linkTemplates)
focal_class.return: String
focal_class.signature: String extractFromFirstMatchingTemplates(Map<String, String> eventResourceLinks, Map<String, String> linkTemplates)
focal_class.class_method_signature: AtomfeedEventConfigurationServiceImpl.extractUuidBasedOnTemplate(String resourceLink, String linkTemplate)
focal_class.full_signature: private String extractUuidBasedOnTemplate(String resourceLink, String linkTemplate)
focal_class.identifier: extractUuidBasedOnTemplate
focal_class.modifiers: private
focal_class.parameters: (String resourceLink, String linkTemplate)
focal_class.return: String
focal_class.signature: String extractUuidBasedOnTemplate(String resourceLink, String linkTemplate)
focal_class.class_method_signature: AtomfeedEventConfigurationServiceImpl.getPositionOfUuidPattern(String[] linkTemplateSplits)
focal_class.full_signature: private int getPositionOfUuidPattern(String[] linkTemplateSplits)
focal_class.identifier: getPositionOfUuidPattern
focal_class.modifiers: private
focal_class.parameters: (String[] linkTemplateSplits)
focal_class.return: int
focal_class.signature: int getPositionOfUuidPattern(String[] linkTemplateSplits)
focal_class.class_method_signature: AtomfeedEventConfigurationServiceImpl.getOnlyUuidValue(String uuid, String linkTemplateSplit)
focal_class.full_signature: private String getOnlyUuidValue(String uuid, String linkTemplateSplit)
focal_class.identifier: getOnlyUuidValue
focal_class.modifiers: private
focal_class.parameters: (String uuid, String linkTemplateSplit)
focal_class.return: String
focal_class.signature: String getOnlyUuidValue(String uuid, String linkTemplateSplit)
focal_class.class_method_signature: AtomfeedEventConfigurationServiceImpl.extractBasedOnResourceLinks(Map<String, String> eventResourceLinks, String preferredClient)
focal_class.full_signature: private String extractBasedOnResourceLinks(Map<String, String> eventResourceLinks, String preferredClient)
focal_class.identifier: extractBasedOnResourceLinks
focal_class.modifiers: private
focal_class.parameters: (Map<String, String> eventResourceLinks, String preferredClient)
focal_class.return: String
focal_class.signature: String extractBasedOnResourceLinks(Map<String, String> eventResourceLinks, String preferredClient)
focal_class.class_method_signature: AtomfeedEventConfigurationServiceImpl.extractFirstMatchingFromLinks(Map<String, String> eventResourceLinks)
focal_class.full_signature: private String extractFirstMatchingFromLinks(Map<String, String> eventResourceLinks)
focal_class.identifier: extractFirstMatchingFromLinks
focal_class.modifiers: private
focal_class.parameters: (Map<String, String> eventResourceLinks)
focal_class.return: String
focal_class.signature: String extractFirstMatchingFromLinks(Map<String, String> eventResourceLinks)
focal_class.class_method_signature: AtomfeedEventConfigurationServiceImpl.extractUsingPattern(String link)
focal_class.full_signature: private String extractUsingPattern(String link)
focal_class.identifier: extractUsingPattern
focal_class.modifiers: private
focal_class.parameters: (String link)
focal_class.return: String
focal_class.signature: String extractUsingPattern(String link)
focal_method.body: @Override
  	public String extractUuidFromResourceLinks(Map<String, String> eventResourceLinks, String eventCategory,
  			String preferredClient) {
  		String uuid = extractBasedOnLinkTemplates(eventResourceLinks, eventCategory, preferredClient);
  		if (StringUtils.isBlank(uuid)) {
  			uuid = extractBasedOnResourceLinks(eventResourceLinks, preferredClient);
  		}
  		return uuid;
  	}
focal_method.class_method_signature: AtomfeedEventConfigurationServiceImpl.extractUuidFromResourceLinks(Map<String, String> eventResourceLinks, String eventCategory,
  			String preferredClient)
focal_method.full_signature: @Override public String extractUuidFromResourceLinks(Map<String, String> eventResourceLinks, String eventCategory,
  			String preferredClient)
focal_method.identifier: extractUuidFromResourceLinks
focal_method.invocations: extractBasedOnLinkTemplates isBlank extractBasedOnResourceLinks
focal_method.modifiers: @Override public
focal_method.parameters: (Map<String, String> eventResourceLinks, String eventCategory,
  			String preferredClient)
focal_method.return: String
focal_method.signature: String extractUuidFromResourceLinks(Map<String, String> eventResourceLinks, String eventCategory,
  			String preferredClient)