← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 20982: fixes for LikeOperator + tests

 

------------------------------------------------------------
revno: 20982
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2015-11-09 12:35:52 +0700
message:
  fixes for LikeOperator + tests
modified:
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/query/operators/LikeOperator.java
  dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/query/CriteriaQueryEngineTest.java
  dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/query/InMemoryQueryEngineTest.java
  dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/query/OperatorTest.java


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/query/operators/LikeOperator.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/query/operators/LikeOperator.java	2015-11-05 06:07:23 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/query/operators/LikeOperator.java	2015-11-09 05:35:52 +0000
@@ -78,13 +78,13 @@
             switch ( matchMode )
             {
                 case EXACT:
-                    return s1.equals( s2 );
+                    return s2.equals( s1 );
                 case START:
-                    return s1.startsWith( s2 );
+                    return s2.startsWith( s1 );
                 case END:
-                    return s1.endsWith( s2 );
+                    return s2.endsWith( s1 );
                 case ANYWHERE:
-                    return s1.contains( s2 );
+                    return s2.contains( s1 );
             }
         }
 

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/query/CriteriaQueryEngineTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/query/CriteriaQueryEngineTest.java	2015-11-05 06:39:11 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/query/CriteriaQueryEngineTest.java	2015-11-09 05:35:52 +0000
@@ -56,7 +56,7 @@
     private SchemaService schemaService;
 
     @Autowired
-    private CriteriaQueryEngine<? extends IdentifiableObject> criteriaQueryEngine;
+    private CriteriaQueryEngine<? extends IdentifiableObject> queryEngine;
 
     @Autowired
     private IdentifiableObjectManager identifiableObjectManager;
@@ -114,7 +114,7 @@
     {
         createDataElements();
         Query query = Query.from( schemaService.getDynamicSchema( DataElement.class ) );
-        assertEquals( 6, criteriaQueryEngine.query( query ).size() );
+        assertEquals( 6, queryEngine.query( query ).size() );
     }
 
     @Test
@@ -125,13 +125,13 @@
         query.setFirstResult( 2 );
         query.setMaxResults( 10 );
 
-        assertEquals( 4, criteriaQueryEngine.query( query ).size() );
+        assertEquals( 4, queryEngine.query( query ).size() );
 
         query = Query.from( schemaService.getDynamicSchema( DataElement.class ) );
         query.setFirstResult( 2 );
         query.setMaxResults( 2 );
 
-        assertEquals( 2, criteriaQueryEngine.query( query ).size() );
+        assertEquals( 2, queryEngine.query( query ).size() );
     }
 
     @Test
@@ -140,7 +140,7 @@
         createDataElements();
         Query query = Query.from( schemaService.getDynamicSchema( DataElement.class ) );
         query.add( Restrictions.eq( "id", "deabcdefghA" ) );
-        List<? extends IdentifiableObject> objects = criteriaQueryEngine.query( query );
+        List<? extends IdentifiableObject> objects = queryEngine.query( query );
 
         assertEquals( 1, objects.size() );
         assertEquals( "deabcdefghA", objects.get( 0 ).getUid() );
@@ -152,7 +152,7 @@
         createDataElements();
         Query query = Query.from( schemaService.getDynamicSchema( DataElement.class ) );
         query.add( Restrictions.ne( "id", "deabcdefghA" ) );
-        List<? extends IdentifiableObject> objects = criteriaQueryEngine.query( query );
+        List<? extends IdentifiableObject> objects = queryEngine.query( query );
 
         assertEquals( 5, objects.size() );
 
@@ -170,7 +170,7 @@
         createDataElements();
         Query query = Query.from( schemaService.getDynamicSchema( DataElement.class ) );
         query.add( Restrictions.like( "name", "F", MatchMode.ANYWHERE ) );
-        List<? extends IdentifiableObject> objects = criteriaQueryEngine.query( query );
+        List<? extends IdentifiableObject> objects = queryEngine.query( query );
 
         assertEquals( 1, objects.size() );
         assertEquals( "deabcdefghF", objects.get( 0 ).getUid() );
@@ -182,7 +182,7 @@
         createDataElements();
         Query query = Query.from( schemaService.getDynamicSchema( DataElement.class ) );
         query.add( Restrictions.gt( "created", Year.parseYear( "2003" ).getStart() ) );
-        List<? extends IdentifiableObject> objects = criteriaQueryEngine.query( query );
+        List<? extends IdentifiableObject> objects = queryEngine.query( query );
 
         assertEquals( 3, objects.size() );
 
@@ -197,7 +197,7 @@
         createDataElements();
         Query query = Query.from( schemaService.getDynamicSchema( DataElement.class ) );
         query.add( Restrictions.lt( "created", Year.parseYear( "2003" ).getStart() ) );
-        List<? extends IdentifiableObject> objects = criteriaQueryEngine.query( query );
+        List<? extends IdentifiableObject> objects = queryEngine.query( query );
 
         assertEquals( 2, objects.size() );
 
@@ -211,7 +211,7 @@
         createDataElements();
         Query query = Query.from( schemaService.getDynamicSchema( DataElement.class ) );
         query.add( Restrictions.ge( "created", Year.parseYear( "2003" ).getStart() ) );
-        List<? extends IdentifiableObject> objects = criteriaQueryEngine.query( query );
+        List<? extends IdentifiableObject> objects = queryEngine.query( query );
 
         assertEquals( 4, objects.size() );
 
@@ -227,7 +227,7 @@
         createDataElements();
         Query query = Query.from( schemaService.getDynamicSchema( DataElement.class ) );
         query.add( Restrictions.le( "created", Year.parseYear( "2003" ).getStart() ) );
-        List<? extends IdentifiableObject> objects = criteriaQueryEngine.query( query );
+        List<? extends IdentifiableObject> objects = queryEngine.query( query );
 
         assertEquals( 3, objects.size() );
 
@@ -242,7 +242,7 @@
         createDataElements();
         Query query = Query.from( schemaService.getDynamicSchema( DataElement.class ) );
         query.add( Restrictions.between( "created", Year.parseYear( "2003" ).getStart(), Year.parseYear( "2005" ).getStart() ) );
-        List<? extends IdentifiableObject> objects = criteriaQueryEngine.query( query );
+        List<? extends IdentifiableObject> objects = queryEngine.query( query );
 
         assertEquals( 3, objects.size() );
 
@@ -257,7 +257,7 @@
         createDataElements();
         Query query = Query.from( schemaService.getDynamicSchema( DataElement.class ) );
         query.add( Restrictions.in( "id", Lists.newArrayList( "deabcdefghD", "deabcdefghF" ) ) );
-        List<? extends IdentifiableObject> objects = criteriaQueryEngine.query( query );
+        List<? extends IdentifiableObject> objects = queryEngine.query( query );
 
         assertEquals( 2, objects.size() );
 
@@ -273,7 +273,7 @@
 
         Query query = Query.from( schema );
         query.addOrder( new Order( schema.getProperty( "name" ), false ) );
-        List<? extends IdentifiableObject> objects = criteriaQueryEngine.query( query );
+        List<? extends IdentifiableObject> objects = queryEngine.query( query );
 
         assertEquals( 6, objects.size() );
 
@@ -293,7 +293,7 @@
 
         Query query = Query.from( schema );
         query.addOrder( new Order( schema.getProperty( "name" ), true ) );
-        List<? extends IdentifiableObject> objects = criteriaQueryEngine.query( query );
+        List<? extends IdentifiableObject> objects = queryEngine.query( query );
 
         assertEquals( 6, objects.size() );
 
@@ -313,7 +313,7 @@
 
         Query query = Query.from( schema );
         query.addOrder( new Order( schema.getProperty( "created" ), false ) );
-        List<? extends IdentifiableObject> objects = criteriaQueryEngine.query( query );
+        List<? extends IdentifiableObject> objects = queryEngine.query( query );
 
         assertEquals( 6, objects.size() );
 
@@ -333,7 +333,7 @@
 
         Query query = Query.from( schema );
         query.addOrder( new Order( schema.getProperty( "created" ), true ) );
-        List<? extends IdentifiableObject> objects = criteriaQueryEngine.query( query );
+        List<? extends IdentifiableObject> objects = queryEngine.query( query );
 
         assertEquals( 6, objects.size() );
 
@@ -356,7 +356,7 @@
         conjunction.add( Restrictions.eq( "id", "deabcdefghF" ) );
         query.add( conjunction );
 
-        List<? extends IdentifiableObject> objects = criteriaQueryEngine.query( query );
+        List<? extends IdentifiableObject> objects = queryEngine.query( query );
 
         assertEquals( 0, objects.size() );
     }
@@ -372,7 +372,7 @@
         disjunction.add( Restrictions.eq( "id", "deabcdefghF" ) );
         query.add( disjunction );
 
-        List<? extends IdentifiableObject> objects = criteriaQueryEngine.query( query );
+        List<? extends IdentifiableObject> objects = queryEngine.query( query );
 
         assertEquals( 2, objects.size() );
 
@@ -389,7 +389,7 @@
         query.add( Restrictions.ge( "created", Year.parseYear( "2002" ).getStart() ) );
         query.add( Restrictions.le( "created", Year.parseYear( "2004" ).getStart() ) );
 
-        List<? extends IdentifiableObject> objects = criteriaQueryEngine.query( query );
+        List<? extends IdentifiableObject> objects = queryEngine.query( query );
 
         assertEquals( 3, objects.size() );
 
@@ -409,7 +409,7 @@
         conjunction.add( Restrictions.le( "created", Year.parseYear( "2004" ).getStart() ) );
         query.add( conjunction );
 
-        List<? extends IdentifiableObject> objects = criteriaQueryEngine.query( query );
+        List<? extends IdentifiableObject> objects = queryEngine.query( query );
 
         assertEquals( 3, objects.size() );
 
@@ -425,7 +425,7 @@
         Query query = Query.from( schemaService.getDynamicSchema( DataElement.class ) );
         query.add( Restrictions.isNull( "categoryCombo" ) );
 
-        List<? extends IdentifiableObject> objects = criteriaQueryEngine.query( query );
+        List<? extends IdentifiableObject> objects = queryEngine.query( query );
 
         assertEquals( 6, objects.size() );
 

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/query/InMemoryQueryEngineTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/query/InMemoryQueryEngineTest.java	2015-11-09 05:05:13 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/query/InMemoryQueryEngineTest.java	2015-11-09 05:35:52 +0000
@@ -58,7 +58,7 @@
     private SchemaService schemaService;
 
     @Autowired
-    private InMemoryQueryEngine<? extends IdentifiableObject> inMemoryQueryEngine;
+    private InMemoryQueryEngine<? extends IdentifiableObject> queryEngine;
 
     private Collection<DataElement> dataElements = new ArrayList<>();
 
@@ -117,7 +117,7 @@
     {
         Query query = Query.from( schemaService.getDynamicSchema( DataElement.class ) );
         query.setObjects( dataElements );
-        assertEquals( 6, inMemoryQueryEngine.query( query ).size() );
+        assertEquals( 6, queryEngine.query( query ).size() );
     }
 
     @Test
@@ -128,14 +128,14 @@
         query.setFirstResult( 2 );
         query.setMaxResults( 10 );
 
-        assertEquals( 4, inMemoryQueryEngine.query( query ).size() );
+        assertEquals( 4, queryEngine.query( query ).size() );
 
         query = Query.from( schemaService.getDynamicSchema( DataElement.class ) );
         query.setObjects( dataElements );
         query.setFirstResult( 2 );
         query.setMaxResults( 2 );
 
-        assertEquals( 2, inMemoryQueryEngine.query( query ).size() );
+        assertEquals( 2, queryEngine.query( query ).size() );
     }
 
     @Test
@@ -144,7 +144,7 @@
         Query query = Query.from( schemaService.getDynamicSchema( DataElement.class ) );
         query.setObjects( dataElements );
         query.add( Restrictions.eq( "id", "deabcdefghA" ) );
-        List<? extends IdentifiableObject> objects = inMemoryQueryEngine.query( query );
+        List<? extends IdentifiableObject> objects = queryEngine.query( query );
 
         assertEquals( 1, objects.size() );
         assertEquals( "deabcdefghA", objects.get( 0 ).getUid() );
@@ -156,7 +156,7 @@
         Query query = Query.from( schemaService.getDynamicSchema( DataElement.class ) );
         query.setObjects( dataElements );
         query.add( Restrictions.ne( "id", "deabcdefghA" ) );
-        List<? extends IdentifiableObject> objects = inMemoryQueryEngine.query( query );
+        List<? extends IdentifiableObject> objects = queryEngine.query( query );
 
         assertEquals( 5, objects.size() );
 
@@ -169,13 +169,12 @@
     }
 
     @Test
-    @Ignore
     public void getLikeQuery()
     {
         Query query = Query.from( schemaService.getDynamicSchema( DataElement.class ) );
         query.setObjects( dataElements );
         query.add( Restrictions.like( "name", "F", MatchMode.ANYWHERE ) );
-        List<? extends IdentifiableObject> objects = inMemoryQueryEngine.query( query );
+        List<? extends IdentifiableObject> objects = queryEngine.query( query );
 
         assertEquals( 1, objects.size() );
         assertEquals( "deabcdefghF", objects.get( 0 ).getUid() );
@@ -187,7 +186,7 @@
         Query query = Query.from( schemaService.getDynamicSchema( DataElement.class ) );
         query.setObjects( dataElements );
         query.add( Restrictions.gt( "created", Year.parseYear( "2003" ).getStart() ) );
-        List<? extends IdentifiableObject> objects = inMemoryQueryEngine.query( query );
+        List<? extends IdentifiableObject> objects = queryEngine.query( query );
 
         assertEquals( 3, objects.size() );
 
@@ -202,7 +201,7 @@
         Query query = Query.from( schemaService.getDynamicSchema( DataElement.class ) );
         query.setObjects( dataElements );
         query.add( Restrictions.lt( "created", Year.parseYear( "2003" ).getStart() ) );
-        List<? extends IdentifiableObject> objects = inMemoryQueryEngine.query( query );
+        List<? extends IdentifiableObject> objects = queryEngine.query( query );
 
         assertEquals( 2, objects.size() );
 
@@ -216,7 +215,7 @@
         Query query = Query.from( schemaService.getDynamicSchema( DataElement.class ) );
         query.setObjects( dataElements );
         query.add( Restrictions.ge( "created", Year.parseYear( "2003" ).getStart() ) );
-        List<? extends IdentifiableObject> objects = inMemoryQueryEngine.query( query );
+        List<? extends IdentifiableObject> objects = queryEngine.query( query );
 
         assertEquals( 4, objects.size() );
 
@@ -232,7 +231,7 @@
         Query query = Query.from( schemaService.getDynamicSchema( DataElement.class ) );
         query.setObjects( dataElements );
         query.add( Restrictions.le( "created", Year.parseYear( "2003" ).getStart() ) );
-        List<? extends IdentifiableObject> objects = inMemoryQueryEngine.query( query );
+        List<? extends IdentifiableObject> objects = queryEngine.query( query );
 
         assertEquals( 3, objects.size() );
 
@@ -248,7 +247,7 @@
         Query query = Query.from( schemaService.getDynamicSchema( DataElement.class ) );
         query.setObjects( dataElements );
         query.add( Restrictions.between( "created", Year.parseYear( "2003" ).getStart(), Year.parseYear( "2005" ).getStart() ) );
-        List<? extends IdentifiableObject> objects = inMemoryQueryEngine.query( query );
+        List<? extends IdentifiableObject> objects = queryEngine.query( query );
 
         assertEquals( 3, objects.size() );
 
@@ -263,7 +262,7 @@
         Query query = Query.from( schemaService.getDynamicSchema( DataElement.class ) );
         query.setObjects( dataElements );
         query.add( Restrictions.in( "id", Lists.newArrayList( "deabcdefghD", "deabcdefghF" ) ) );
-        List<? extends IdentifiableObject> objects = inMemoryQueryEngine.query( query );
+        List<? extends IdentifiableObject> objects = queryEngine.query( query );
 
         assertEquals( 2, objects.size() );
 
@@ -280,7 +279,7 @@
         Query query = Query.from( schema );
         query.setObjects( dataElements );
         query.addOrder( new Order( schema.getProperty( "name" ), false ) );
-        List<? extends IdentifiableObject> objects = inMemoryQueryEngine.query( query );
+        List<? extends IdentifiableObject> objects = queryEngine.query( query );
 
         assertEquals( 6, objects.size() );
 
@@ -301,7 +300,7 @@
         Query query = Query.from( schema );
         query.setObjects( dataElements );
         query.addOrder( new Order( schema.getProperty( "name" ), true ) );
-        List<? extends IdentifiableObject> objects = inMemoryQueryEngine.query( query );
+        List<? extends IdentifiableObject> objects = queryEngine.query( query );
 
         assertEquals( 6, objects.size() );
 
@@ -322,7 +321,7 @@
         Query query = Query.from( schema );
         query.setObjects( dataElements );
         query.addOrder( new Order( schema.getProperty( "created" ), false ) );
-        List<? extends IdentifiableObject> objects = inMemoryQueryEngine.query( query );
+        List<? extends IdentifiableObject> objects = queryEngine.query( query );
 
         assertEquals( 6, objects.size() );
 
@@ -343,7 +342,7 @@
         Query query = Query.from( schema );
         query.setObjects( dataElements );
         query.addOrder( new Order( schema.getProperty( "created" ), true ) );
-        List<? extends IdentifiableObject> objects = inMemoryQueryEngine.query( query );
+        List<? extends IdentifiableObject> objects = queryEngine.query( query );
 
         assertEquals( 6, objects.size() );
 
@@ -367,7 +366,7 @@
         conjunction.add( Restrictions.eq( "id", "deabcdefghF" ) );
         query.add( conjunction );
 
-        List<? extends IdentifiableObject> objects = inMemoryQueryEngine.query( query );
+        List<? extends IdentifiableObject> objects = queryEngine.query( query );
 
         assertEquals( 0, objects.size() );
     }
@@ -384,7 +383,7 @@
         disjunction.add( Restrictions.eq( "id", "deabcdefghF" ) );
         query.add( disjunction );
 
-        List<? extends IdentifiableObject> objects = inMemoryQueryEngine.query( query );
+        List<? extends IdentifiableObject> objects = queryEngine.query( query );
 
         assertEquals( 2, objects.size() );
 
@@ -401,7 +400,7 @@
         query.add( Restrictions.ge( "created", Year.parseYear( "2002" ).getStart() ) );
         query.add( Restrictions.le( "created", Year.parseYear( "2004" ).getStart() ) );
 
-        List<? extends IdentifiableObject> objects = inMemoryQueryEngine.query( query );
+        List<? extends IdentifiableObject> objects = queryEngine.query( query );
 
         assertEquals( 3, objects.size() );
 
@@ -422,7 +421,7 @@
         conjunction.add( Restrictions.le( "created", Year.parseYear( "2004" ).getStart() ) );
         query.add( conjunction );
 
-        List<? extends IdentifiableObject> objects = inMemoryQueryEngine.query( query );
+        List<? extends IdentifiableObject> objects = queryEngine.query( query );
 
         assertEquals( 3, objects.size() );
 
@@ -438,7 +437,7 @@
         query.setObjects( dataElements );
         query.add( Restrictions.isNull( "categoryCombo" ) );
 
-        List<? extends IdentifiableObject> objects = inMemoryQueryEngine.query( query );
+        List<? extends IdentifiableObject> objects = queryEngine.query( query );
 
         assertEquals( 6, objects.size() );
 
@@ -457,7 +456,7 @@
         query.setObjects( dataElements );
         query.add( Restrictions.isNotNull( "categoryCombo" ) );
 
-        List<? extends IdentifiableObject> objects = inMemoryQueryEngine.query( query );
+        List<? extends IdentifiableObject> objects = queryEngine.query( query );
 
         assertEquals( 0, objects.size() );
     }

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/query/OperatorTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/query/OperatorTest.java	2015-11-05 06:07:23 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/query/OperatorTest.java	2015-11-09 05:35:52 +0000
@@ -222,61 +222,61 @@
     @Test
     public void testLikeAnywhere()
     {
-        LikeOperator operator = new LikeOperator( "operator", true, MatchMode.ANYWHERE );
+        LikeOperator operator = new LikeOperator( "oper", true, MatchMode.ANYWHERE );
 
-        assertTrue( operator.test( "pera" ) );
-        assertFalse( operator.test( "PERA" ) );
+        assertTrue( operator.test( "operator" ) );
+        assertFalse( operator.test( "OPERATOR" ) );
         assertFalse( operator.test( "abc" ) );
     }
 
     @Test
     public void testLikeStart()
     {
-        LikeOperator operator = new LikeOperator( "operator", true, MatchMode.START );
+        LikeOperator operator = new LikeOperator( "oper", true, MatchMode.START );
 
-        assertTrue( operator.test( "ope" ) );
-        assertFalse( operator.test( "OPE" ) );
+        assertTrue( operator.test( "operator" ) );
+        assertFalse( operator.test( "OPERATOR" ) );
         assertFalse( operator.test( "abc" ) );
     }
 
     @Test
     public void testLikeEnd()
     {
-        LikeOperator operator = new LikeOperator( "operator", true, MatchMode.END );
+        LikeOperator operator = new LikeOperator( "ator", true, MatchMode.END );
 
-        assertTrue( operator.test( "or" ) );
-        assertFalse( operator.test( "OPERA" ) );
-        assertFalse( operator.test( "opera" ) );
+        assertTrue( operator.test( "operator" ) );
+        assertFalse( operator.test( "OPERATOR" ) );
+        assertFalse( operator.test( "abc" ) );
     }
 
     @Test
     public void testILikeAnywhere()
     {
-        LikeOperator operator = new LikeOperator( "operator", false, MatchMode.ANYWHERE );
+        LikeOperator operator = new LikeOperator( "erat", false, MatchMode.ANYWHERE );
 
-        assertTrue( operator.test( "pera" ) );
-        assertTrue( operator.test( "PERA" ) );
+        assertTrue( operator.test( "operator" ) );
+        assertTrue( operator.test( "OPERATOR" ) );
         assertFalse( operator.test( "abc" ) );
     }
 
     @Test
     public void testILikeStart()
     {
-        LikeOperator operator = new LikeOperator( "operator", false, MatchMode.START );
+        LikeOperator operator = new LikeOperator( "oper", false, MatchMode.START );
 
-        assertTrue( operator.test( "ope" ) );
-        assertTrue( operator.test( "OPE" ) );
-        assertFalse( operator.test( "ator" ) );
+        assertTrue( operator.test( "operator" ) );
+        assertTrue( operator.test( "OPERATOR" ) );
+        assertFalse( operator.test( "abc" ) );
     }
 
     @Test
     public void testILikeEnd()
     {
-        LikeOperator operator = new LikeOperator( "operator", false, MatchMode.END );
+        LikeOperator operator = new LikeOperator( "ator", false, MatchMode.END );
 
-        assertTrue( operator.test( "ator" ) );
-        assertTrue( operator.test( "ATOR" ) );
-        assertFalse( operator.test( "opera" ) );
+        assertTrue( operator.test( "operator" ) );
+        assertTrue( operator.test( "OPERATOR" ) );
+        assertFalse( operator.test( "abc" ) );
     }
 
     @Test