@Test
public void testDeleteFileType() throws Exception
{

    // Create a file type.
    FileType fileType = new FileType(FORMAT_FILE_TYPE_CODE);
    when(fileTypeService.deleteFileType(new FileTypeKey(FORMAT_FILE_TYPE_CODE))).thenReturn(fileType);
    FileType deletedFileType = fileTypeRestController.deleteFileType(FORMAT_FILE_TYPE_CODE);
    // Verify the external calls.
    verify(fileTypeService).deleteFileType(new FileTypeKey(FORMAT_FILE_TYPE_CODE));
    verifyNoMoreInteractions(fileTypeService);
    // Validate the returned object.
    assertEquals(fileType, deletedFileType);
}