### Question:
WheelchairFlagEncoder extends FootFlagEncoder { @Override public void applyWayTags(ReaderWay way, EdgeIteratorState edge) { PointList pl = edge.fetchWayGeometry(3); double prevEle = pl.getElevation(0); double fullDist2D = edge.getDistance(); if (Double.isInfinite(fullDist2D)) { throw new IllegalStateException("Infinite distance should not happen due to #435. way ID=" + way.getId()); } if (fullDist2D < 1) { return; } double eleDelta = pl.getElevation(pl.size() - 1) - prevEle; double elePercent = eleDelta / fullDist2D * 100; int smallInclinePercent = 3; if (elePercent > smallInclinePercent && elePercent < maxInclinePercent) { setFwdBwdSpeed(edge, SLOW_SPEED, MEAN_SPEED); } else if (elePercent < -smallInclinePercent && elePercent > -maxInclinePercent) { setFwdBwdSpeed(edge, MEAN_SPEED, SLOW_SPEED); } else if (elePercent > maxInclinePercent || elePercent < -maxInclinePercent) { edge.set(accessEnc, false); edge.setReverse(accessEnc, false); } } WheelchairFlagEncoder();  WheelchairFlagEncoder(PMap properties);  WheelchairFlagEncoder(int speedBits, double speedFactor); @Override int getVersion(); @Override EncodingManager.Access getAccess(ReaderWay way); @Override IntsRef handleWayTags(IntsRef edgeFlags, ReaderWay way, EncodingManager.Access access); @Override void applyWayTags(ReaderWay way, EdgeIteratorState edge); @Override String toString();  }### Answer:
@Test public void testApplyWayTags() { Graph graph = initExampleGraph(); EdgeIteratorState edge0 = GHUtility.getEdge(graph, 0, 1); ReaderWay way0 = new ReaderWay(1); wheelchairEncoder.applyWayTags(way0, edge0); assertTrue(edge0.get(wheelchairAccessEnc)); assertTrue(edge0.getReverse(wheelchairAccessEnc)); assertEquals(2, edge0.get(wheelchairEncoder.getAverageSpeedEnc()), 0); assertEquals(5, edge0.getReverse(wheelchairEncoder.getAverageSpeedEnc()), 0); EdgeIteratorState edge1 = GHUtility.getEdge(graph, 2, 3); ReaderWay way1 = new ReaderWay(2); wheelchairEncoder.applyWayTags(way1, edge1); assertFalse(edge1.get(wheelchairAccessEnc)); assertFalse(edge1.getReverse(wheelchairAccessEnc)); }