// Path: product-catalog-context/src/main/java/se/citerus/cqrs/bookstore/productcatalog/api/ProductDto.java
// public class ProductDto extends TransportObject {
// 
//   @NotEmpty
//   @Pattern(regexp = ID_PATTERN)
//   public String productId;
// 
//   @Valid
//   public BookDto book;
// 
//   @Min(0)
//   public long price;
// 
//   @NotEmpty
//   @Pattern(regexp = ID_PATTERN)
//   public String publisherContractId;
// 
// }


import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.io.Resources;
import org.junit.Ignore;
import se.citerus.cqrs.bookstore.productcatalog.api.ProductDto;
import java.util.List;
import static com.google.common.base.Charsets.UTF_8;
import static com.google.common.io.Resources.getResource;
package se.citerus.cqrs.bookstore.productcatalog.application;




@Ignore
public class TestProductDataImporter {

  private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper();
  private static final String SERVER_RESOURCE = "http://localhost:8090/products";
  private static final String DEFAULT_PATH = "test-products.json";

  public static void main(String[] args) {
    try {
      TestHttpClient productClient = new TestHttpClient(SERVER_RESOURCE).init();

      // Add products
      String productJson = Resources.toString(getResource(DEFAULT_PATH), UTF_8);
// Path: product-catalog-context/src/main/java/se/citerus/cqrs/bookstore/productcatalog/api/ProductDto.java
// public class ProductDto extends TransportObject {
// 
//   @NotEmpty
//   @Pattern(regexp = ID_PATTERN)
//   public String productId;
// 
//   @Valid
//   public BookDto book;
// 
//   @Min(0)
//   public long price;
// 
//   @NotEmpty
//   @Pattern(regexp = ID_PATTERN)
//   public String publisherContractId;
// 
// }


// Path: product-catalog-context/src/test/java/se/citerus/cqrs/bookstore/productcatalog/application/TestProductDataImporter.java
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.io.Resources;
import org.junit.Ignore;
import se.citerus.cqrs.bookstore.productcatalog.api.ProductDto;
import java.util.List;
import static com.google.common.base.Charsets.UTF_8;
import static com.google.common.io.Resources.getResource;

package se.citerus.cqrs.bookstore.productcatalog.application;




@Ignore
public class TestProductDataImporter {

  private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper();
  private static final String SERVER_RESOURCE = "http://localhost:8090/products";
  private static final String DEFAULT_PATH = "test-products.json";

  public static void main(String[] args) {
    try {
      TestHttpClient productClient = new TestHttpClient(SERVER_RESOURCE).init();

      // Add products
      String productJson = Resources.toString(getResource(DEFAULT_PATH), UTF_8);
      TypeReference<List<ProductDto>> listOfProductRequests = new TypeReference<List<ProductDto>>() {