@Test
public void testUpdateTag()
{

    // Create a parent tag key.
    TagKey parentTagKey = new TagKey(TAG_TYPE, TAG_CODE);
    TagUpdateRequest request = new TagUpdateRequest(TAG_DISPLAY_NAME_3, TAG_SEARCH_SCORE_MULTIPLIER_3, TAG_DESCRIPTION_3, parentTagKey);
    // Create a tag key.
    TagKey tagKey = new TagKey(TAG_TYPE, TAG_CODE_2);
    Tag tag = getNewTag(tagKey);
    when(tagService.updateTag(tagKey, request)).thenReturn(tag);
    // Update the tag.
    Tag updatedTag = tagRestController.updateTag(TAG_TYPE, TAG_CODE_2, request);
    // Verify the external calls.
    verify(tagService).updateTag(tagKey, request);
    verifyNoMoreInteractions(tagService);
    // Validate the returned object.
    assertEquals(tag, updatedTag);
    ;
}