@Test
public void testDeleteTag()
{

    // Create a tag key.
    TagKey tagKey = new TagKey(TAG_TYPE, TAG_CODE);
    Tag tag = getNewTag(tagKey);
    when(tagService.deleteTag(tagKey)).thenReturn(tag);
    // Delete this tag.
    Tag deletedTag = tagRestController.deleteTag(TAG_TYPE, TAG_CODE);
    // Verify the external calls.
    verify(tagService).deleteTag(tagKey);
    verifyNoMoreInteractions(tagService);
    // Validate the returned object.
    assertEquals(tag, deletedTag);
}