MergeAdjacentQuantities extends MergeAdjacent { private void setNormalizedUnit(Quantity qMerged, String unit) { if (StringUtils.isBlank(qMerged.getNormalizedUnit())) { qMerged.setNormalizedUnit(unit); } }  @Override void doInitialize(UimaContext aContext); @Override boolean shouldMerge(Entity e1, Entity e2); @Override boolean mergeAdditionalProperties(
      Entity merged, Class<? extends Entity> type, List<Entity> originalEntities); @Override AnalysisEngineAction getAction();  }
@Test public void testMissingNormalizedUnit() throws Exception { jCas.setDocumentText("The package was 4st 8oz"); Quantity q = Annotations.createWeightQuantity(jCas, 16, 19, "4st", 4, "st", 25.4012); q.setNormalizedUnit(null); Annotations.createWeightQuantity(jCas, 20, 23, "80z", 8, "oz", 0.2268); processJCas(); assertEquals(2, JCasUtil.select(jCas, Quantity.class).size()); }