### Question:
DriftDetector { static double diff(double a, double b) { Preconditions.checkArgument(a >= 0 && a < 360); Preconditions.checkArgument(b >= 0 && b < 360); double value; if (a < b) value = a + 360 - b; else value = a - b; if (value > 180) return 360 - value; else return value; }  static Observable<DriftCandidate> getCandidates(Observable<HasFix> o, Options options); static DriftDetectorTransformer detectDrift(); static DriftDetectorTransformer detectDrift(Options options);  }### Answer:
@Test public void testDiff() { assertEquals(0, diff(0, 0), PRECISION); }
@Test public void testDiff2() { assertEquals(10, diff(30, 20), PRECISION); }
@Test public void testDiff3() { assertEquals(10, diff(20, 30), PRECISION); }
@Test public void testDiff4() { assertEquals(20, diff(350, 10), PRECISION); }
@Test public void testDiff5() { assertEquals(20, diff(10, 350), PRECISION); }