### Question:
FootFlagEncoder extends AbstractFlagEncoder { @Override public double getSpeed(long flags) { double speed = super.getSpeed(flags); 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 int defineWayBits(int index, int shift); @Override int defineRelationBits(int index, int shift); @Override int defineTurnBits(int index, int shift); @Override boolean isTurnRestricted(long flag); @Override double getTurnCost(long flag); @Override long getTurnFlags(boolean restricted, double costs); @Override long acceptWay(ReaderWay way); @Override long handleRelationTags(ReaderRelation relation, long oldRelationFlags); @Override long handleWayTags(ReaderWay way, long allowed, long relationFlags); @Override double getDouble(long flags, int key); @Override boolean supports(Class<?> feature); @Override String toString(); @Override double getSpeed(long flags);  }### Answer:
@Test public void testGetSpeed() { long fl = footEncoder.setProperties(10, true, true); assertEquals(10, footEncoder.getSpeed(fl), 1e-1); }
@Test public void testBasics() { long fl = footEncoder.flagsDefault(true, true); assertEquals(FootFlagEncoder.MEAN_SPEED, footEncoder.getSpeed(fl), 1e-1); long fl1 = footEncoder.flagsDefault(true, false); long fl2 = footEncoder.reverseFlags(fl1); assertEquals(footEncoder.getSpeed(fl2), footEncoder.getSpeed(fl1), 1e-1); }
@Test public void testCombined() { FlagEncoder carEncoder = encodingManager.getEncoder("car"); long fl = footEncoder.setProperties(10, true, true) | carEncoder.setProperties(100, true, false); assertEquals(10, footEncoder.getSpeed(fl), 1e-1); assertTrue(footEncoder.isForward(fl)); assertTrue(footEncoder.isBackward(fl)); assertEquals(100, carEncoder.getSpeed(fl), 1e-1); assertTrue(carEncoder.isForward(fl)); assertFalse(carEncoder.isBackward(fl)); assertEquals(0, carEncoder.getSpeed(footEncoder.setProperties(10, true, true)), 1e-1); }