@Test
public void testSearchBusinessObjectDefinitionColumns()
{

    // Create business object definition change event
    List<BusinessObjectDefinitionColumnChangeEvent> businessObjectDefinitionColumnChangeEvents =
        Lists.newArrayList(new BusinessObjectDefinitionColumnChangeEvent(BDEF_COLUMN_DESCRIPTION, CREATED_ON, CREATED_BY));
    BusinessObjectDefinitionColumnSearchRequest request = new BusinessObjectDefinitionColumnSearchRequest(Lists.newArrayList(
        new BusinessObjectDefinitionColumnSearchFilter(Lists.newArrayList(new BusinessObjectDefinitionColumnSearchKey(BDEF_NAMESPACE, BDEF_NAME)))));
    BusinessObjectDefinitionColumnSearchResponse businessObjectDefinitionColumnSearchResponse = new BusinessObjectDefinitionColumnSearchResponse(Arrays
        .asList(new BusinessObjectDefinitionColumn(NO_ID, new BusinessObjectDefinitionColumnKey(BDEF_NAMESPACE, BDEF_NAME, BDEF_COLUMN_NAME), COLUMN_NAME,
                BDEF_COLUMN_DESCRIPTION, businessObjectDefinitionColumnChangeEvents),
            new BusinessObjectDefinitionColumn(NO_ID, new BusinessObjectDefinitionColumnKey(BDEF_NAMESPACE, BDEF_NAME, BDEF_COLUMN_NAME_2), COLUMN_NAME_2,
                BDEF_COLUMN_DESCRIPTION_2, businessObjectDefinitionColumnChangeEvents)));
    Set<String> set = Sets.newHashSet(SCHEMA_COLUMN_NAME_FIELD, DESCRIPTION_FIELD);
    when(businessObjectDefinitionColumnService.searchBusinessObjectDefinitionColumns(request, set))
        .thenReturn(businessObjectDefinitionColumnSearchResponse);
    // Search the business object definition columns.
    BusinessObjectDefinitionColumnSearchResponse resultSearchResponse =
        businessObjectDefinitionColumnRestController.searchBusinessObjectDefinitionColumns(set, request);
    // Verify the external calls.
    verify(businessObjectDefinitionColumnService).searchBusinessObjectDefinitionColumns(request, set);
    verifyNoMoreInteractions(businessObjectDefinitionColumnService);
    // Validate the returned object.
    assertEquals(businessObjectDefinitionColumnSearchResponse, resultSearchResponse);
}