@Test
  @Transactional
  public void deleteSocio() throws Exception {
    // Initialize the database
    socioRepository.saveAndFlush(socio);

    int databaseSizeBeforeDelete = socioRepository.findAll().size();

    // Get the socio
    restSocioMockMvc
        .perform(delete("/api/socios/{id}", socio.getId()).accept(TestUtil.APPLICATION_JSON_UTF8))
        .andExpect(status().isOk());

    // Validate the database is empty
    List<Socio> socios = socioRepository.findAll();
    assertThat(socios).hasSize(databaseSizeBeforeDelete - 1);
  }
  @Test
  @Transactional
  public void createSocio() throws Exception {
    int databaseSizeBeforeCreate = socioRepository.findAll().size();

    // Create the Socio

    restSocioMockMvc
        .perform(
            post("/api/socios")
                .contentType(TestUtil.APPLICATION_JSON_UTF8)
                .content(TestUtil.convertObjectToJsonBytes(socio)))
        .andExpect(status().isCreated());

    // Validate the Socio in the database
    List<Socio> socios = socioRepository.findAll();
    assertThat(socios).hasSize(databaseSizeBeforeCreate + 1);
    Socio testSocio = socios.get(socios.size() - 1);
    assertThat(testSocio.getNombre()).isEqualTo(DEFAULT_NOMBRE);
  }
  @Test
  @Transactional
  public void updateSocio() throws Exception {
    // Initialize the database
    socioRepository.saveAndFlush(socio);

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

    // Update the socio
    socio.setNombre(UPDATED_NOMBRE);

    restSocioMockMvc
        .perform(
            put("/api/socios")
                .contentType(TestUtil.APPLICATION_JSON_UTF8)
                .content(TestUtil.convertObjectToJsonBytes(socio)))
        .andExpect(status().isOk());

    // Validate the Socio in the database
    List<Socio> socios = socioRepository.findAll();
    assertThat(socios).hasSize(databaseSizeBeforeUpdate);
    Socio testSocio = socios.get(socios.size() - 1);
    assertThat(testSocio.getNombre()).isEqualTo(UPDATED_NOMBRE);
  }