@Test
public void testCreateFileTypeAlreadyExists()
{

    expectedException.expect(AlreadyExistsException.class);
    expectedException.expectMessage(String.format("Unable to create file type \"%s\" because it already exists.", FORMAT_FILE_TYPE_CODE));
    when(fileTypeMockDao.getFileTypeByCode(FORMAT_FILE_TYPE_CODE)).thenReturn(FILE_TYPE_ENTITY);
    when(alternateKeyHelper.validateStringParameter(anyString(), anyString())).thenReturn(FORMAT_FILE_TYPE_CODE);
    fileTypeMockService.createFileType(FILE_TYPE_CREATE_REQUEST);
}