@Test
public void testDeleteTagType() throws Exception
{

    TagTypeKey tagTypeKey = new TagTypeKey(TAG_TYPE);
    TagType tagType = new TagType(new TagTypeKey(TAG_TYPE), TAG_TYPE_DISPLAY_NAME, TAG_TYPE_ORDER, TAG_TYPE_DESCRIPTION);
    when(tagTypeService.deleteTagType(tagTypeKey)).thenReturn(tagType);
    // Delete this tag type.
    TagType deletedTagType = tagTypeRestController.deleteTagType(TAG_TYPE);
    // Verify the external calls.
    verify(tagTypeService).deleteTagType(tagTypeKey);
    verifyNoMoreInteractions(tagTypeService);
    // Validate the returned object.
    assertEquals(tagType, deletedTagType);
}