### Question:
ApproximateAngle implements PioSerializable { public boolean contains(int angle) { int lo = this.angle - variance; int hi = this.angle + variance; while (angle < lo) angle += 360; while (angle > hi) angle -= 360; return lo <= angle && angle <= hi; } ApproximateAngle(int angle, int variance);  ApproximateAngle(ParamSet paramSet); ParamSet getParamSet(PioFactory factory, String name); int getAngle(); int getVariance(); boolean contains(int angle); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj);  }### Answer:
@Test public void testContains() { final int angle = 350; final int range = 50; ApproximateAngle a = new ApproximateAngle(angle, range); assertTrue(a.contains(angle - range)); assertTrue(a.contains(angle - range - 360)); assertTrue(a.contains(angle + range)); assertTrue(a.contains(angle + range - 360)); assertFalse(a.contains(angle - range - 1)); assertFalse(a.contains(angle + range + 1)); }