source: class UnitCategoryParserTest  {
  
      @Test
      public void testCheckUnit() {
  
target:     	
      	//check Unit 
          assertNull(UnitCategoryParser.checkUnit("100 km", null));
          assertNotNull(UnitCategoryParser.checkUnit("100 km", UnitCategoryParser.getUnitCategory("All")));
          assertNull(UnitCategoryParser.checkUnit("100 km", UnitCategoryParser.getUnitCategory("Area")));
          assertNotNull(UnitCategoryParser.checkUnit("100 km", UnitCategoryParser.getUnitCategory("Distance")));
          
          // check Quantifier
          assertNull(UnitCategoryParser.checkQuantity("100 km"));
          assertNull(UnitCategoryParser.checkUnit("100 million", null));
          assertNotNull(UnitCategoryParser.checkQuantity("100 million"));
          assertEquals(UnitCategoryParser.getQuantity("million"),UnitCategoryParser.checkQuantity("100 million km"));
          
       // check Unit
          assertEquals("kilometre",UnitCategoryParser.checkUnit("100 million km", UnitCategoryParser.getUnitCategory("Distance")).getName());
          assertEquals(UnitCategoryParser.checkQuantity("million"), UnitCategoryParser.checkQuantity("100 million km"));
          
       // check Unit
          assertNull(UnitCategoryParser.checkUnit("$ 50", null));
          assertNull(UnitCategoryParser.checkUnit("$ 50 million", null));
      }
  
  }