@@ -45,7 +45,6 @@ public static void setUpBeforeClass() throws Exception {
4545 // System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.http.wire", "debug");
4646 System .out .println ("In setup" );
4747 setupJavaRESTServer (dbName , fNames [0 ], restServerName ,restPort );
48-
4948 BasicJavaClientREST .addRangeElementIndex (dbName , "long" , "" , "inventory" );
5049 BasicJavaClientREST .addRangeElementIndex (dbName , "long" , "" , "id" );
5150 }
@@ -126,7 +125,7 @@ public void loadSimplePojos(PojoRepository products)
126125 }
127126 }
128127 }
129- @ Test
128+ @ Test ( expected = ClassCastException . class )
130129 public void testPOJOqbeSearchWithoutSearchHandle () {
131130 PojoRepository <Artifact ,Long > products = client .newPojoRepository (Artifact .class , Long .class );
132131 PojoPage <Artifact > p ;
@@ -165,7 +164,7 @@ public void testPOJOqbeSearchWithoutSearchHandle() {
165164 assertEquals ("page number after the loop" ,4 ,p .getPageNumber ());
166165 assertEquals ("total no of pages" ,4 ,p .getTotalPages ());
167166 }
168- @ Test
167+ @ Test ( expected = ClassCastException . class )
169168 public void testPOJOqbeSearchWithSearchHandle () {
170169 PojoRepository <Artifact ,Long > products = client .newPojoRepository (Artifact .class , Long .class );
171170 PojoPage <Artifact > p ;
@@ -217,7 +216,7 @@ public void testPOJOqbeSearchWithSearchHandle() {
217216 assertEquals ("page number after the loop" ,5 ,p .getPageNumber ());
218217 assertEquals ("total no of pages" ,5 ,p .getTotalPages ());
219218 }
220- @ Test
219+ @ Test ( expected = ClassCastException . class )
221220 public void testPOJOCombinedSearchWithJacksonHandle () {
222221 PojoRepository <Artifact ,Long > products = client .newPojoRepository (Artifact .class , Long .class );
223222 PojoPage <Artifact > p ;
@@ -262,7 +261,7 @@ public void testPOJOCombinedSearchWithJacksonHandle() {
262261 assertEquals ("total no of pages" ,1 ,p .getTotalPages ());
263262 }
264263 //Searching for Id as Number in JSON using range query
265- @ Test
264+ @ Test ( expected = ClassCastException . class )
266265 public void testPOJOcombinedSearchforNumberWithStringHandle () throws JsonProcessingException , IOException {
267266 PojoRepository <Artifact ,Long > products = client .newPojoRepository (Artifact .class , Long .class );
268267 PojoPage <Artifact > p ;
0 commit comments