// Path: spring-data-solr-demo-jaxrs/src/main/java/org/tuxdevelop/spring/data/solr/demo/api/StoreService.java
// @Path("/stores")
// public interface StoreService {
// 
//     String SEARCH = "/search";
// 
//     @POST
//     @Path("/")
//     @Produces("application/json")
//     @Consumes("application/json")
//     StarbucksStore add(final StarbucksStore starbucksStore);
// 
//     @GET
//     @Path("/{id}")
//     @Produces("application/json")
//     StarbucksStore get(@PathParam("id") String id);
// 
//     @DELETE
//     @Path("/{id}")
//     void delete(@PathParam("id") final String id);
// 
//     @GET
//     @Path(SEARCH + "/byName")
//     @Produces("application/json")
//     Collection<StarbucksStore> findByName(@QueryParam("name") final String name);
// 
//     @GET
//     @Path(SEARCH + "/near")
//     @Produces("application/json")
//     Collection<StarbucksStore> findNear(@QueryParam("longtitude") final Double longtitude,
//                                @QueryParam("latitude") final Double latitude,
//                                @QueryParam("distance") final Double distance,
//                                @QueryParam("products") final List<String> products);
// 
// }
// 
// Path: spring-data-solr-demo-common/src/main/java/org/tuxdevelop/spring/data/solr/demo/domain/StarbucksStore.java
// @Data
// @AllArgsConstructor
// @NoArgsConstructor
// @SolrDocument
// @XmlRootElement
// public class StarbucksStore {
// 
//     @Id
//     @Field("id")
//     private String id;
//     @Field("name")
//     private String name;
//     @Field("zipCode")
//     private String zipCode;
//     @Field("city")
//     private String city;
//     @Field("street")
//     private String street;
//     @Field("products")
//     private Collection<String> products;
//     @Field("services")
//     private Collection<String> services;
//     @JsonIgnore
//     @Field("location")
//     private Point location;
// 
// }


import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.geo.Point;
import org.tuxdevelop.spring.data.solr.demo.api.StoreService;
import org.tuxdevelop.spring.data.solr.demo.domain.StarbucksStore;
import java.util.Collection;
import java.util.LinkedList;
import java.util.List;
import static org.assertj.core.api.Assertions.assertThat;
package org.tuxdevelop.spring.data.solr.demo.service;





public abstract class CommonStoreServiceIT {

    @Autowired
    private StoreService storeService;

    @Test
    public void addIT() {
        final Collection<String> products = new LinkedList<>();
        products.add("Tux");
        final Collection<String> services = new LinkedList<>();
        services.add("Live Hacking");
        final StarbucksStore starbucksStore = new StarbucksStore();
        starbucksStore.setStreet("Test Street");
        starbucksStore.setCity("Test City");
        starbucksStore.setLocation(new Point(40D, 40D));
        starbucksStore.setName("TestStarbucksStore");
        starbucksStore.setProducts(products);
        starbucksStore.setServices(services);
        starbucksStore.setZipCode("12345");
        final StarbucksStore addedStarbucksStore = storeService.add(starbucksStore);
// Path: spring-data-solr-demo-jaxrs/src/main/java/org/tuxdevelop/spring/data/solr/demo/api/StoreService.java
// @Path("/stores")
// public interface StoreService {
// 
//     String SEARCH = "/search";
// 
//     @POST
//     @Path("/")
//     @Produces("application/json")
//     @Consumes("application/json")
//     StarbucksStore add(final StarbucksStore starbucksStore);
// 
//     @GET
//     @Path("/{id}")
//     @Produces("application/json")
//     StarbucksStore get(@PathParam("id") String id);
// 
//     @DELETE
//     @Path("/{id}")
//     void delete(@PathParam("id") final String id);
// 
//     @GET
//     @Path(SEARCH + "/byName")
//     @Produces("application/json")
//     Collection<StarbucksStore> findByName(@QueryParam("name") final String name);
// 
//     @GET
//     @Path(SEARCH + "/near")
//     @Produces("application/json")
//     Collection<StarbucksStore> findNear(@QueryParam("longtitude") final Double longtitude,
//                                @QueryParam("latitude") final Double latitude,
//                                @QueryParam("distance") final Double distance,
//                                @QueryParam("products") final List<String> products);
// 
// }
// 
// Path: spring-data-solr-demo-common/src/main/java/org/tuxdevelop/spring/data/solr/demo/domain/StarbucksStore.java
// @Data
// @AllArgsConstructor
// @NoArgsConstructor
// @SolrDocument
// @XmlRootElement
// public class StarbucksStore {
// 
//     @Id
//     @Field("id")
//     private String id;
//     @Field("name")
//     private String name;
//     @Field("zipCode")
//     private String zipCode;
//     @Field("city")
//     private String city;
//     @Field("street")
//     private String street;
//     @Field("products")
//     private Collection<String> products;
//     @Field("services")
//     private Collection<String> services;
//     @JsonIgnore
//     @Field("location")
//     private Point location;
// 
// }


// Path: spring-data-solr-demo-jaxrs/src/test/java/org/tuxdevelop/spring/data/solr/demo/service/CommonStoreServiceIT.java
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.geo.Point;
import org.tuxdevelop.spring.data.solr.demo.api.StoreService;
import org.tuxdevelop.spring.data.solr.demo.domain.StarbucksStore;
import java.util.Collection;
import java.util.LinkedList;
import java.util.List;
import static org.assertj.core.api.Assertions.assertThat;

package org.tuxdevelop.spring.data.solr.demo.service;





public abstract class CommonStoreServiceIT {

    @Autowired
    private StoreService storeService;

    @Test
    public void addIT() {
        final Collection<String> products = new LinkedList<>();
        products.add("Tux");
        final Collection<String> services = new LinkedList<>();
        services.add("Live Hacking");
        final StarbucksStore starbucksStore = new StarbucksStore();
        starbucksStore.setStreet("Test Street");
        starbucksStore.setCity("Test City");
        starbucksStore.setLocation(new Point(40D, 40D));
        starbucksStore.setName("TestStarbucksStore");
        starbucksStore.setProducts(products);
        starbucksStore.setServices(services);
        starbucksStore.setZipCode("12345");
        final StarbucksStore addedStarbucksStore = storeService.add(starbucksStore);
        assertThat(addedStarbucksStore).isNotNull();