### Question:
OSMMaxWeightParser implements TagParser { @Override public IntsRef handleWayTags(IntsRef edgeFlags, ReaderWay way, boolean ferry, IntsRef relationFlags) { List<String> weightTags = Arrays.asList("maxweight", "maxgcweight"); OSMValueExtractor.extractTons(edgeFlags, way, weightEncoder, weightTags); return edgeFlags; } OSMMaxWeightParser();  OSMMaxWeightParser(DecimalEncodedValue weightEncoder); @Override void createEncodedValues(EncodedValueLookup lookup, List<EncodedValue> registerNewEncodedValue); @Override IntsRef handleWayTags(IntsRef edgeFlags, ReaderWay way, boolean ferry, IntsRef relationFlags);  }### Answer:
@Test public void testSimpleTags() { ReaderWay readerWay = new ReaderWay(1); IntsRef intsRef = em.createEdgeFlags(); readerWay.setTag("highway", "primary"); readerWay.setTag("maxweight", "5"); parser.handleWayTags(intsRef, readerWay, false, em.createRelationFlags()); assertEquals(5.0, mwEnc.getDecimal(false, intsRef), .01); intsRef = em.createEdgeFlags(); readerWay.setTag("maxweight", "50"); parser.handleWayTags(intsRef, readerWay, false, em.createRelationFlags()); assertEquals(mwEnc.getMaxDecimal(), mwEnc.getDecimal(false, intsRef), .01); }