### Question:
FootFlagEncoder extends AbstractFlagEncoder { @Override double getSpeed(boolean reverse, IntsRef edgeFlags) { double speed = super.getSpeed(reverse, edgeFlags); if (speed == getMaxSpeed()) { return SHORT_TRIP_FERRY_SPEED; } return speed; } FootFlagEncoder();  FootFlagEncoder(PMap properties);  FootFlagEncoder(String propertiesStr);  FootFlagEncoder(int speedBits, double speedFactor); @Override int getVersion(); @Override void createEncodedValues(List<EncodedValue> registerNewEncodedValue, String prefix, int index); @Override EncodingManager.Access getAccess(ReaderWay way); @Override IntsRef handleWayTags(IntsRef edgeFlags, ReaderWay way, EncodingManager.Access access); @Override boolean supports(Class<?> feature); @Override String toString();  }### Answer:
@Test public void testGetSpeed() { IntsRef fl = encodingManager.createEdgeFlags(); footAccessEnc.setBool(false, fl, true); footAccessEnc.setBool(true, fl, true); footAvSpeedEnc.setDecimal(false, fl, 10); assertEquals(10, footEncoder.getSpeed(fl), 1e-1); }
@Test public void testBasics() { IntsRef edgeFlags = encodingManager.createEdgeFlags(); footEncoder.flagsDefault(edgeFlags, true, true); assertEquals(FootFlagEncoder.MEAN_SPEED, footEncoder.getSpeed(edgeFlags), 1e-1); IntsRef ef1 = encodingManager.createEdgeFlags(); footEncoder.flagsDefault(ef1, true, false); IntsRef ef2 = encodingManager.createEdgeFlags(); footEncoder.flagsDefault(ef2, false, true); assertEquals(footAccessEnc.getBool(false, ef1), footAccessEnc.getBool(true, ef2)); assertEquals(footEncoder.getSpeed(ef1), footEncoder.getSpeed(ef1), 1e-1); }