### Question:
MetricUnitsUtils { public static Number scaleToBaseUnit(Number value, Metadata metadata) { if (!metadata.getUnit().isPresent()) { return value; } String unit = metadata.getUnit().get(); return scaleToBaseUnit(value, unit); } private  MetricUnitsUtils(); static String baseUnit(String unit); static Number scaleToBaseUnit(Number value, Metadata metadata); static Number scaleToBaseUnit(Number value, String unit);  }### Answer:
@Test public void metadataWithoutUnitDoesNotScaleValues() { Number value = 42.2d; assertSame(value, scaleToBaseUnit(value, Metadata.builder().withName("somename").build())); assertSame(value, scaleToBaseUnit(value, Metadata.builder().withName("somename").withOptionalUnit(null).build())); }