@Test
  public void shouldReturnCompanyProductsFamilyDD() {
    // given

    // when
    DataDefinition result = deliveriesService.getCompanyProductsFamilyDD();

    // then
    assertEquals(companyProductsFamilyDD, result);
  }
  @Test
  public void shouldReturnColumnForOrdersDD() {
    // given

    // when
    DataDefinition result = deliveriesService.getColumnForOrdersDD();

    // then
    assertEquals(columnForOrdersDD, result);
  }
  @Test
  public void shouldReturnDeliveredProductDD() {
    // given

    // when
    DataDefinition result = deliveriesService.getDeliveredProductDD();

    // then
    assertEquals(deliveredProductDD, result);
  }
  @Test
  public void shouldReturnCompanyProductsFamilyWhenGetCompanyProductsFamily() {
    // given
    Long companyProductsFamilyId = 1L;

    given(companyProductsFamilyDD.get(companyProductsFamilyId)).willReturn(companyProductsFamily);

    // when
    Entity result = deliveriesService.getCompanyProductsFamily(companyProductsFamilyId);

    // then
    assertEquals(companyProductsFamily, result);
  }
  @Test
  public void shouldReturnNullWhenGetCompanyProductsFamily() {
    // given
    Long companyProductsFamilyId = null;

    given(companyProductsFamilyDD.get(companyProductsFamilyId)).willReturn(null);

    // when
    Entity result = deliveriesService.getDeliveredProduct(companyProductsFamilyId);

    // then
    assertEquals(null, result);
  }
  @Test
  public void shouldReturnDeliveredProductWhenGetDeliveredProduct() {
    // given
    Long deliveredProductId = 1L;

    given(deliveredProductDD.get(deliveredProductId)).willReturn(deliveredProduct);

    // when
    Entity result = deliveriesService.getDeliveredProduct(deliveredProductId);

    // then
    assertEquals(deliveredProduct, result);
  }
  @Test
  public void shouldReturnNullWhenGetOrderedProduct() {
    // given
    Long orderedProductId = null;

    given(orderedProductDD.get(orderedProductId)).willReturn(null);

    // when
    Entity result = deliveriesService.getOrderedProduct(orderedProductId);

    // then
    assertEquals(null, result);
  }
  @Test
  public void shouldReturnDeliveryWhenGetDelivery() {
    // given
    Long deliveryId = 1L;

    given(deliveryDD.get(deliveryId)).willReturn(delivery);

    // when
    Entity result = deliveriesService.getDelivery(deliveryId);

    // then
    assertEquals(delivery, result);
  }
  @Test
  public void shouldReturnColumnsForOrdersWhenGetColumnsForOrdersIfColumnsForOrdersArentNull() {
    // given
    given(columnForOrdersDD.find()).willReturn(searchCriteriaBuilder);
    given(searchCriteriaBuilder.addOrder(Mockito.any(SearchOrder.class)))
        .willReturn(searchCriteriaBuilder);
    given(searchCriteriaBuilder.list()).willReturn(searchResult);
    given(searchResult.getEntities()).willReturn(columnsForOrders);

    // when
    List<Entity> result = deliveriesService.getColumnsForOrders();

    // then
    assertEquals(columnsForOrders, result);
  }