### Question:
SyncUtils { public static String getValueOfAtomfeedEventTag(List tags, AtomfeedTagContent atomfeedTagContent) { for (Object tag : tags) { if (checkIfParamIsFeedFilter(tag)) { continue; } String tagValue = getTagValue(tag); boolean isTagEventAction = checkIfParamIsEventAction(tagValue); if (atomfeedTagContent == AtomfeedTagContent.EVENT_ACTION && isTagEventAction) { return tagValue; } if (atomfeedTagContent == AtomfeedTagContent.CATEGORY && !isTagEventAction) { return tagValue; } } throw new SyncException(String.format("'%s' enum not found in tag list", atomfeedTagContent.name())); }  static Map<String, String> getLinks(String json); static String getParentBaseUrl(String clientName); static String getSpecificClientAddress(String clientName); static boolean clientHasSpecificAddress(String clientName, OpenMRSSyncInstance instance); static String getLocalBaseUrl(); static String getLocalInstanceId(); static String getPullUrl(Map<String, String> resourceLinks, String clientName, OpenMRSSyncInstance instance); static String getPushUrl(Map<String, String> resourceLinks, String clientName, OpenMRSSyncInstance instance); static String getClientSpecificLogin(String clientName); static String getClientSpecificPassword(String clientName); static boolean clientHasSpecificCridentials(String clientName, OpenMRSSyncInstance instance); static String getClientLogin(String clientName, OpenMRSSyncInstance instance); static String getClientPassword(String clientName, OpenMRSSyncInstance instance); static String getValueOfAtomfeedEventTag(List tags, AtomfeedTagContent atomfeedTagContent); static String getFullUrl(String baseAddress, String path); static String selectAppropriateClientName(Map<String, String> availableResourceLinks, String category,
			SyncOperation operation); static String getClassPreferredClient(ClassConfiguration classConfiguration); static String getGlobalPreferredClient(); static String extractUUIDFromResourceLinks(Map<String, String> resourceLinks, String category,
			String preferredClient); static boolean compareLocalAndPulled(String clientName, String category, Object from, Object dest); static String prettySerialize(Map<T, T> map); static String serialize(T object); static T deserialize(String object, Class<T> clazz); static Map<String, String> deserializeJsonToStringsMap(String json); static boolean checkIfParamIsFeedFilter(Object tag); static boolean checkIfParamIsEventAction(String actionName); static SyncConfigurationService getSyncConfigurationService(); static Gson createDefaultGson(); static MergeBehaviour getMergeBehaviour(); static String getEventHandlerName(); static boolean parentInstanceUriIsEmpty(); static boolean isDeleteAction(String action); static boolean isUpdateAction(String action); static boolean isCreateAction(String action); static boolean isUnauthorizedException(Throwable e); static boolean isAuditMessageCategory(SyncCategory category);  }### Answer:
@Test public void getValueOfAtomfeedEventTag_shouldReturnCategoryDespiteItsOrderInList() { final String expected = "patient"; String result1 = SyncUtils.getValueOfAtomfeedEventTag(prepareDummyAtomfeedTags1(), AtomfeedTagContent.CATEGORY); String result2 = SyncUtils.getValueOfAtomfeedEventTag(prepareDummyAtomfeedTags2(), AtomfeedTagContent.CATEGORY); Assert.assertEquals(expected, result1); Assert.assertEquals(expected, result2); }
@Test public void getValueOfAtomfeedEventTag_shouldReturnEventActionDespiteItsOrderInList() { final String expected = "CREATED"; String result1 = SyncUtils.getValueOfAtomfeedEventTag(prepareDummyAtomfeedTags1(), AtomfeedTagContent.EVENT_ACTION); String result2 = SyncUtils.getValueOfAtomfeedEventTag(prepareDummyAtomfeedTags2(), AtomfeedTagContent.EVENT_ACTION); Assert.assertEquals(expected, result1); Assert.assertEquals(expected, result2); }