QuantityUtils { public static int countPeriods(String haystack) { return StringUtils.countOccurrencesOf(haystack, "."); } private  QuantityUtils(); static Quantity createQuantity(
      JCas aJCas,
      Matcher matcher,
      String unit,
      double scale,
      String normalizedUnit,
      String quantityType); static int countPeriods(String haystack); static double scaleByMultipler(double amount, String multiplier);  }
@Test public void testHaystack() { assertEquals(1, QuantityUtils.countPeriods("1.2")); assertEquals(2, QuantityUtils.countPeriods("1..2")); assertEquals(2, QuantityUtils.countPeriods("1.2.3")); }