@Test
  public void testProductCRUD() {

    // create local product object
    Product product = SolrTestUtils.createProduct(PRODUCT_ID);

    // save product to Solr Index and confirm index count increased by 1
    repo.save(product);
    Assert.assertEquals(INITIAL_RECORD_COUNT + 1, repo.count());

    // find single product from Solr
    Product loaded = repo.findOne(Integer.toString(PRODUCT_ID));
    Assert.assertEquals(product.getName(), loaded.getName());

    // update product name in Solr and confirm index count not changed
    loaded.setName("changed named");
    repo.save(loaded);
    Assert.assertEquals(INITIAL_RECORD_COUNT + 1, repo.count());

    // retrieve product from Solr and confirm name change
    loaded = repo.findOne(Integer.toString(PRODUCT_ID));
    Assert.assertEquals("changed named", loaded.getName());

    // delete the test product in Solr and confirm index count equal to initial count
    repo.delete(loaded);
    Assert.assertEquals(INITIAL_RECORD_COUNT, repo.count());
  }
  @Test
  public void simpleQueryTest() {
    List<Product> baseList = SolrTestUtils.createProductList(10);
    repo.save(baseList);
    Assert.assertEquals(baseList.size(), TEST_RECORD_COUNT);
    Assert.assertEquals(INITIAL_RECORD_COUNT + TEST_RECORD_COUNT, repo.count());

    List<Product> productsByCategory = repo.findProductsBySimpleQuery("cat:test");
    Assert.assertEquals(TEST_RECORD_COUNT, productsByCategory.size());
  }