  @Test
  @Transactional
  public void createAddress() throws Exception {


    mockAddressEndpoint.perform(get("/addresses/count"))
      .andExpect(status().isOk())
      .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))
      .andExpect(content().string(ALL_ADDRESSES));

    // tag::createValidAddress[]
    Address address = new Address().street1("233 Spring Street").city("New York").state("NY").zipcode("12345").country("USA");

    mockAddressEndpoint.perform(post("/addresses")
      .contentType("application/json")
      .content(convertObjectToJsonBytes(address)))
      .andExpect(status().isOk());
    // end::createValidAddress[]

    mockAddressEndpoint.perform(get("/addresses/count"))
      .andExpect(status().isOk())
      .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))
      .andExpect(content().string("8"));
  }