@Test
public void testGetBusinessObjectDefinitionDescriptionSuggestionEntityWithException()
{

    // Setup
    NamespaceEntity namespaceEntity = new NamespaceEntity();
    namespaceEntity.setCode(NAMESPACE);
    BusinessObjectDefinitionEntity businessObjectDefinitionEntity = new BusinessObjectDefinitionEntity();
    businessObjectDefinitionEntity.setName(BDEF_NAME);
    businessObjectDefinitionEntity.setNamespace(namespaceEntity);
    // Setup mock interactions.
    when(businessObjectDefinitionDescriptionSuggestionDao
        .getBusinessObjectDefinitionDescriptionSuggestionByBusinessObjectDefinitionAndUserId(businessObjectDefinitionEntity, USER_ID)).thenReturn(null);
    try
    {
        // Call method under test.
        businessObjectDefinitionDescriptionSuggestionDaoHelper
            .getBusinessObjectDefinitionDescriptionSuggestionEntity(businessObjectDefinitionEntity, USER_ID);
        fail();
    }
    catch (ObjectNotFoundException objectNotFoundException)
    {
        // Validate exception message.
        assertThat("Exception message is not correct.", objectNotFoundException.getMessage(), is(equalTo(String.format(
            "Business object definition description suggestion with the parameters " +
                " {namespace=\"%s\", businessObjectDefinitionName=\"%s\", userId=\"%s\"} does not exist.",
            businessObjectDefinitionEntity.getNamespace().getCode(), businessObjectDefinitionEntity.getName(), USER_ID))));
    }
    // Verify mocks interactions.
    verify(businessObjectDefinitionDescriptionSuggestionDao)
        .getBusinessObjectDefinitionDescriptionSuggestionByBusinessObjectDefinitionAndUserId(businessObjectDefinitionEntity, USER_ID);
    verifyNoMoreInteractions(businessObjectDefinitionDescriptionSuggestionDao);
}