### Question:
UnitNormalizer { public static double getNormalizedNumber(String unitText) throws NumberFormatException, NullPointerException { unitText = unitText.replaceAll("(\\d)([A-Za-z\"])", "$1 $2").trim(); String words[] = unitText.split(" "); if (words.length == 0) { words = unitText.trim().split("(?<=[0-9])(?=\\w)"); } double number = Double.parseDouble(words[0]); String newUnitText = ""; for (int i = 1; i < words.length; i++) { newUnitText += words[i] + " "; } return getNormalizedNumber(number, newUnitText.trim(), 3, ""); }  static String detectUnit(String text); static String detectUnit(String text, UnitType unitType); static Collection<String> getAllUnitsOfSameType(String unit); static boolean isBigger(String unitB, String unitS); static boolean unitsSameType(String unit1, String unit2); static String findBaseUnit(String unit); static double unitLookup(String unit); static double handleSpecialFormat(double number, String unitText, int decimals); static double transorm(String unitTo, double value); static double transorm(String unitTo, String value); static UnitType getUnitType(String string); static double getNormalizedNumber(String unitText); static double getNormalizedNumber(double number, String unitText); static double getNormalizedNumber(double number, String unitText, int decimals, String combinedSearchPreviousUnit); static Pair<Double, List<String>> smartTransform(Double normalizedValue, UnitType unitType); static void main(String[] args);  }### Answer:
@Test public void testTranslationNormalized() { collector.checkThat(UnitNormalizer.getNormalizedNumber(5, UnitTranslator.translate("cm", Language.GERMAN)), Matchers.is(5.)); collector.checkThat(UnitNormalizer.getNormalizedNumber(5, UnitTranslator.translate("Zoll", Language.GERMAN)), Matchers.is(12.7)); collector.checkThat(UnitNormalizer.getNormalizedNumber(1, UnitTranslator.translate("kilowattstunde", Language.GERMAN)), Matchers.is(3600000.)); collector.checkThat(UnitTranslator.translateUnitsOfInput("schleuderdrehzahl 7 U/min", Language.GERMAN), Matchers.is("schleuderdrehzahl 7 rpm")); collector.checkThat(UnitTranslator.translateUnitsOfInput("schleuderdrehzahl 7 u/minute", Language.GERMAN), Matchers.is("schleuderdrehzahl 7 rpm")); collector.checkThat(UnitTranslator.translateUnitsOfInput("description maximale schleuderdrehzahl: ca. 1.600 u/minute beim standardprogram baumwolle 60° c", Language.GERMAN), Matchers.is("description maximale schleuderdrehzahl: ca. 1.600 rpm beim standardprogram baumwolle 60° c")); collector.checkThat(UnitTranslator.translateUnitsOfInput("nach einer Fahrzeit von 7 stunden", Language.GERMAN), Matchers.is("nach einer fahrzeit von 7 hours")); collector.checkThat(UnitTranslator.translateUnitsOfInput("Altersempfehlung ab 9 jahren", Language.GERMAN), Matchers.is("altersempfehlung ab 9 years")); collector.checkThat(UnitTranslator.translateUnitsOfInput("mit 12 kilokalorien sehr gesund", Language.GERMAN), Matchers.is("mit 12 kilocalories sehr gesund")); }