@Before
 public void initTest() {
   shipOrder = new ShipOrder();
   shipOrder.setDeliveryTimeStamp(DEFAULT_DELIVERY_TIME_STAMP);
   shipOrder.setFinalCosts(DEFAULT_FINAL_COSTS);
   shipOrder.setReadyForShipping(DEFAULT_READY_FOR_SHIPPING);
 }
  @Test
  @Transactional
  public void updateShipOrder() throws Exception {
    // Initialize the database
    shipOrderRepository.saveAndFlush(shipOrder);

    int databaseSizeBeforeUpdate = shipOrderRepository.findAll().size();

    // Update the shipOrder
    shipOrder.setDeliveryTimeStamp(UPDATED_DELIVERY_TIME_STAMP);
    shipOrder.setFinalCosts(UPDATED_FINAL_COSTS);
    shipOrder.setReadyForShipping(UPDATED_READY_FOR_SHIPPING);

    restShipOrderMockMvc
        .perform(
            put("/api/shipOrders")
                .contentType(TestUtil.APPLICATION_JSON_UTF8)
                .content(TestUtil.convertObjectToJsonBytes(shipOrder)))
        .andExpect(status().isOk());

    // Validate the ShipOrder in the database
    List<ShipOrder> shipOrders = shipOrderRepository.findAll();
    assertThat(shipOrders).hasSize(databaseSizeBeforeUpdate);
    ShipOrder testShipOrder = shipOrders.get(shipOrders.size() - 1);
    assertThat(testShipOrder.getDeliveryTimeStamp()).isEqualTo(UPDATED_DELIVERY_TIME_STAMP);
    assertThat(testShipOrder.getFinalCosts()).isEqualTo(UPDATED_FINAL_COSTS);
    assertThat(testShipOrder.getReadyForShipping()).isEqualTo(UPDATED_READY_FOR_SHIPPING);
  }