diff --git a/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/jpa/secondlevelcache/JPA2LCTestCase.java b/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/jpa/secondlevelcache/JPA2LCTestCase.java
index e47d5b0..1fdb87f 100644
--- a/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/jpa/secondlevelcache/JPA2LCTestCase.java
+++ b/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/jpa/secondlevelcache/JPA2LCTestCase.java
@@ -140,22 +140,22 @@ public class JPA2LCTestCase {
 
         assertTrue("was able to read deleted database row from second level cache", emp != null);
     }
-    
+
     // When caching is disabled, no extra action is done or exception happens
  	// even if the code marks an entity and/or a query as cacheable
  	@Test
  	public void testDisabledCache() throws Exception {
- 	
+
  		SFSB2LC sfsb = lookup("SFSB2LC", SFSB2LC.class);
  		String message = sfsb.disabled2LCCheck();
- 		
+
  		if (!message.equals("OK")){
  			fail(message);
  		}
  	}
 
  	// When entity caching is enabled, loading all entities at once
- 	// will put all entities in the cache. During the SAME session, 
+ 	// will put all entities in the cache. During the SAME session,
  	// when looking up for the ID of an entity which was returned by
  	// the original query, no SQL queries should be executed.
  	@Test
@@ -163,41 +163,41 @@ public class JPA2LCTestCase {
 
  		SFSB2LC sfsb = lookup("SFSB2LC", SFSB2LC.class);
  		String message = sfsb.sameSessionCheck(CACHE_REGION_NAME);
- 		
+
  		if (!message.equals("OK")){
  			fail(message);
  		}
  	}
 
  	// When entity caching is enabled, loading all entities at once
- 	// will put all entities in the cache. During the SECOND session, 
+ 	// will put all entities in the cache. During the SECOND session,
  	// when looking up for the ID of an entity which was returned by
  	// the original query, no SQL queries should be executed.
  	@Test
  	public void testEntityCacheSecondSession() throws Exception {
- 		
+
  		SFSB2LC sfsb = lookup("SFSB2LC", SFSB2LC.class);
  		String message = sfsb.secondSessionCheck(CACHE_REGION_NAME);
- 		
+
  		if (!message.equals("OK")){
  			fail(message);
  		}
 
  	}
- 	
+
  	// Check if evicting entity second level cache is working as expected
 	@Test
  	public void testEvictEntityCache() throws Exception {
-		
+
  		SFSB2LC sfsb = lookup("SFSB2LC", SFSB2LC.class);
  		String message = sfsb.evict2LCCheck(CACHE_REGION_NAME);
- 		
+
  		if (!message.equals("OK")){
  			fail(message);
  		}
 
  	}
- 	
+
  	// When query caching is enabled, running the same query twice 
  	// without any operations between them will perform SQL queries only once.
  	@Test
@@ -205,7 +205,7 @@ public class JPA2LCTestCase {
 
  		SFSB2LC sfsb = lookup("SFSB2LC", SFSB2LC.class);
  		String message = sfsb.sameQueryTwice();
- 		
+
  		if (!message.equals("OK")){
  			fail(message);
  		}
@@ -218,19 +218,47 @@ public class JPA2LCTestCase {
 
  		SFSB2LC sfsb = lookup("SFSB2LC", SFSB2LC.class);
  		String message = sfsb.invalidateQuery();
- 		
+
  		if (!message.equals("OK")){
  			fail(message);
  		}
  	}
+
+    //When query caching is enabled, running a query to return all entities of a class
+    // and then adding one entity of such class would invalidate the cache
+    @Test
+    public void testInvalidateQuery2() throws Exception {
+
+        SFSB2LC sfsb = lookup("SFSB2LC", SFSB2LC.class);
+        String message = sfsb.testInvalidateQuery();
+
+        if (!message.equals("OK")){
+            fail(message);
+        }
+        //this is the magic part
+        //it was part of business method of SFSB2LC in {@link #testInvalidateQuery}
+        //in that case, this method would join the existing TX (container create for sfsb.invalidateQuery
+        //that's why you need call em.flush manually
+        //and the invalidate is actually not finished (still waiting for the TX finish)
+        //this is expected
+
+        //in this case, I call this method separatly, which container will take care of the TX for this method
+        sfsb.createEmployee("Newman", "Paul", 400);
+        message = sfsb.testInvalidateQuery2();
+
+        if (!message.equals("OK")){
+            fail(message);
+        }
+
+    }
  	
  	// Check if evicting query cache is working as expected
  	@Test
  	public void testEvictQueryCache() throws Exception {
- 		
+
  		SFSB2LC sfsb = lookup("SFSB2LC", SFSB2LC.class);
  		String message = sfsb.evictQueryCacheCheck();
- 		
+
  		if (!message.equals("OK")){
  			fail(message);
  		}
diff --git a/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/jpa/secondlevelcache/SFSB2LC.java b/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/jpa/secondlevelcache/SFSB2LC.java
index e5aaff4..6f0b455 100644
--- a/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/jpa/secondlevelcache/SFSB2LC.java
+++ b/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/jpa/secondlevelcache/SFSB2LC.java
@@ -210,7 +210,57 @@ public class SFSB2LC {
 		}
 		return "OK";
 	}
-	
+
+    public String testInvalidateQuery() {
+        EntityManager em = emf.createEntityManager();
+        Statistics stats = em.unwrap(Session.class).getSessionFactory().getStatistics();
+        stats.clear();
+        try {
+            String queryString = "from Employee e where e.id > 1";
+            QueryStatistics queryStats = stats.getQueryStatistics(queryString);
+            Query query = em.createQuery(queryString);
+            query.setHint("org.hibernate.cacheable", true);
+
+            // query - this call should fill the cache
+            query.getResultList();
+            assertEquals("Expected 1 put in cache"+generateQueryCacheStats(queryStats), 1,  queryStats.getCachePutCount());
+            assertEquals("Expected no hits in cache"+generateQueryCacheStats(queryStats), 0,  queryStats.getCacheHitCount());
+
+            // query - should hit cache
+            query.getResultList();
+            assertEquals("Expected 1 hit in cache"+generateQueryCacheStats(queryStats), 1,  queryStats.getCacheHitCount());
+        } catch (AssertionError e) {
+            return e.getMessage();
+        } finally {
+            em.close();
+        }
+        return "OK";
+    }
+    public String testInvalidateQuery2() {
+        EntityManager em = emf.createEntityManager();
+        Statistics stats = em.unwrap(Session.class).getSessionFactory().getStatistics();
+        stats.clear();
+        try {
+            String queryString = "from Employee e where e.id > 1";
+            QueryStatistics queryStats = stats.getQueryStatistics(queryString);
+            Query query = em.createQuery(queryString);
+            query.setHint("org.hibernate.cacheable", true);
+
+            // first call should miss and the second should hit the cache
+            query.getResultList();
+            assertEquals("Expected 1 miss in cache"+generateQueryCacheStats(queryStats), 1,  queryStats.getCacheMissCount());
+            assertEquals("Expected 1 put in cache"+generateQueryCacheStats(queryStats), 1,  queryStats.getCachePutCount());
+            assertEquals("Expected 0 hit in cache"+generateQueryCacheStats(queryStats), 0,  queryStats.getCacheHitCount());
+
+            query.getResultList();
+            assertEquals("Expected 1 hits in cache"+generateQueryCacheStats(queryStats), 1,  queryStats.getCacheHitCount());
+        } catch (AssertionError e) {
+            return e.getMessage();
+        } finally {
+            em.close();
+        }
+        return "OK";
+    }
 	
 	/**
 	 *  Query cache is invalidated and restored then
@@ -334,6 +384,25 @@ public class SFSB2LC {
 		}
 	}
 
+    /**
+     * Create employee in provided EntityManager
+     */
+    public void createEmployee(String name, String address,
+                               int id) {
+        EntityManager em = emf.createEntityManager();
+        Employee emp = new Employee();
+        emp.setId(id);
+        emp.setAddress(address);
+        emp.setName(name);
+        try {
+            em.persist(emp);
+        } catch (Exception e) {
+            throw new RuntimeException(	"transactional failure while persisting employee entity", e);
+        } finally {
+            em.close();
+        }
+    }
+
 	
 	/**
 	 * Load employee from provided EntityManager
