@Test
 public void cancelDevliveryChangedOrderTest2() {
   order.setDeliveryMethod(DeliveryMethod.COURIER);
   if (order.getStatus().equals(OrderStatus.PAYMENT_PENDING)
       || order.getPayMethod().equals(PaymentMethod.UNKNOWN)
       || order.getDeliveryMethod().equals(DeliveryMethod.UNKNOWN)) {
     order.setStatus(OrderStatus.CANCELED);
   }
   assertEquals(order.getStatus(), OrderStatus.CANCELED);
 }
  @Test
  public void cancelAlreadyCreatedOrderTest() {

    if (order.getStatus().equals(OrderStatus.PAYMENT_PENDING)
        || order.getPayMethod().equals(PaymentMethod.UNKNOWN)
        || order.getDeliveryMethod().equals(DeliveryMethod.UNKNOWN)) {

      order.setStatus(OrderStatus.CANCELED);
    }
    assertEquals(order.getStatus(), OrderStatus.CANCELED);
  }