@Test
public void testValidateExternalInterfaceUpdateRequestExtraSpaces()
{

    when(alternateKeyHelper.validateStringParameter(anyString(), anyString())).thenReturn(DISPLAY_NAME_FIELD);
    assertEquals(DISPLAY_NAME_FIELD_WITH_EXTRA_SPACES, EXTERNAL_INTERFACE_UPDATE_REQUEST_WITH_EXTRA_SPACES_IN_DISPLAY_NAME.getDisplayName());
    externalInterfaceService.validateExternalInterfaceUpdateRequest(EXTERNAL_INTERFACE_UPDATE_REQUEST_WITH_EXTRA_SPACES_IN_DISPLAY_NAME);
    // White space should be trimmed now
    assertEquals(DISPLAY_NAME_FIELD, EXTERNAL_INTERFACE_UPDATE_REQUEST_WITH_EXTRA_SPACES_IN_DISPLAY_NAME.getDisplayName());
}