test_class.file: alien4cloud-common/src/test/java/alien4cloud/utils/ElasticSearchUtilTest.java
test_class.identifier: ElasticSearchUtilTest
test_case.body: @Test
      public void doTest() {
          SearchResponse response = Mockito.mock(SearchResponse.class);
          SearchHits hits = Mockito.mock(SearchHits.class);
  
          Assert.assertTrue(ElasticSearchUtil.isResponseEmpty(null));
          Mockito.when(response.getHits()).thenReturn(null);
          Assert.assertTrue(ElasticSearchUtil.isResponseEmpty(response));
          Mockito.reset(response);
          Mockito.when(hits.getHits()).thenReturn(null);
          Mockito.when(response.getHits()).thenReturn(hits);
          Assert.assertTrue(ElasticSearchUtil.isResponseEmpty(response));
  
          Mockito.reset(response, hits);
          Mockito.when(hits.getHits()).thenReturn(new SearchHit[0]);
          Mockito.when(response.getHits()).thenReturn(hits);
          Assert.assertTrue(ElasticSearchUtil.isResponseEmpty(response));
  
          Mockito.reset(response, hits);
          Mockito.when(hits.getHits()).thenReturn(new SearchHit[10]);
          Mockito.when(response.getHits()).thenReturn(hits);
          Assert.assertFalse(ElasticSearchUtil.isResponseEmpty(response));
      }
test_case.class_method_signature: ElasticSearchUtilTest.doTest()
test_case.full_signature: @Test public void doTest()
test_case.identifier: doTest
test_case.invocations: mock mock assertTrue isResponseEmpty thenReturn when getHits assertTrue isResponseEmpty reset thenReturn when getHits thenReturn when getHits assertTrue isResponseEmpty reset thenReturn when getHits thenReturn when getHits assertTrue isResponseEmpty reset thenReturn when getHits thenReturn when getHits assertFalse isResponseEmpty
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void doTest()
focal_class.file: alien4cloud-common/src/main/java/alien4cloud/utils/ElasticSearchUtil.java
focal_class.identifier: ElasticSearchUtil
focal_class.class_method_signature: ElasticSearchUtil.ElasticSearchUtil()
focal_class.full_signature: private  ElasticSearchUtil()
focal_class.identifier: ElasticSearchUtil
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  ElasticSearchUtil()
focal_class.class_method_signature: ElasticSearchUtil.isResponseEmpty(SearchResponse searchResponse)
focal_class.full_signature: public static boolean isResponseEmpty(SearchResponse searchResponse)
focal_class.identifier: isResponseEmpty
focal_class.modifiers: public static
focal_class.parameters: (SearchResponse searchResponse)
focal_class.return: boolean
focal_class.signature: boolean isResponseEmpty(SearchResponse searchResponse)
focal_method.body: public static boolean isResponseEmpty(SearchResponse searchResponse) {
          if (searchResponse == null || searchResponse.getHits() == null || searchResponse.getHits().getHits() == null
                  || searchResponse.getHits().getHits().length == 0) {
              return true;
          }
          return false;
      }
focal_method.class_method_signature: ElasticSearchUtil.isResponseEmpty(SearchResponse searchResponse)
focal_method.full_signature: public static boolean isResponseEmpty(SearchResponse searchResponse)
focal_method.identifier: isResponseEmpty
focal_method.invocations: getHits getHits getHits getHits getHits
focal_method.modifiers: public static
focal_method.parameters: (SearchResponse searchResponse)
focal_method.return: boolean
focal_method.signature: boolean isResponseEmpty(SearchResponse searchResponse)