@Before
 public void initTest() {
   bloodPressure = new BloodPressure();
   bloodPressure.setTimestamp(DEFAULT_TIMESTAMP);
   bloodPressure.setSystolic(DEFAULT_SYSTOLIC);
   bloodPressure.setDiastolic(DEFAULT_DIASTOLIC);
 }
  @Test
  @Transactional
  public void updateBloodPressure() throws Exception {
    // Initialize the database
    bloodPressureRepository.saveAndFlush(bloodPressure);

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

    // Update the bloodPressure
    bloodPressure.setTimestamp(UPDATED_TIMESTAMP);
    bloodPressure.setSystolic(UPDATED_SYSTOLIC);
    bloodPressure.setDiastolic(UPDATED_DIASTOLIC);

    restBloodPressureMockMvc
        .perform(
            put("/api/bloodPressures")
                .contentType(TestUtil.APPLICATION_JSON_UTF8)
                .content(TestUtil.convertObjectToJsonBytes(bloodPressure)))
        .andExpect(status().isOk());

    // Validate the BloodPressure in the database
    List<BloodPressure> bloodPressures = bloodPressureRepository.findAll();
    assertThat(bloodPressures).hasSize(databaseSizeBeforeUpdate);
    BloodPressure testBloodPressure = bloodPressures.get(bloodPressures.size() - 1);
    assertThat(testBloodPressure.getTimestamp()).isEqualTo(UPDATED_TIMESTAMP);
    assertThat(testBloodPressure.getSystolic()).isEqualTo(UPDATED_SYSTOLIC);
    assertThat(testBloodPressure.getDiastolic()).isEqualTo(UPDATED_DIASTOLIC);
  }