### Question:
ArcSwipe implements Swiper { @VisibleForTesting float getSweepAngle(float startAngle, float endAngle, boolean isClockwise) { float sweepAngle = endAngle - startAngle; if (sweepAngle < 0) { sweepAngle += 360; } return isClockwise ? sweepAngle : (360 - sweepAngle); } ArcSwipe(Gesture gesture, RectF bounds); @Override Swiper.Status sendSwipe(
            UiController uiController,
            float[] startCoordinates,
            float[] endCoordinates,
            float[] precision);  }### Answer:
@Test public void testSweepAngleClockwise() { assertEquals(0, mArcSwipeUnderTest.getSweepAngle(0, 0, true), 0.0f); assertEquals(360, mArcSwipeUnderTest.getSweepAngle(0, 360, true), 0.0f); assertEquals(90, mArcSwipeUnderTest.getSweepAngle(0, 90, true), 0.0f); assertEquals(90, mArcSwipeUnderTest.getSweepAngle(90, 180, true), 0.0f); assertEquals(225, mArcSwipeUnderTest.getSweepAngle(45, 270, true), 0.0f); assertEquals(270, mArcSwipeUnderTest.getSweepAngle(90, 0, true), 0.0f); assertEquals(170, mArcSwipeUnderTest.getSweepAngle(280, 90, true), 0.0f); }
@Test public void testSweepAngleAntiClockwise() { assertEquals(360, mArcSwipeUnderTest.getSweepAngle(0, 0, false), 0.0f); assertEquals(0, mArcSwipeUnderTest.getSweepAngle(0, 360, false), 0.0f); assertEquals(270, mArcSwipeUnderTest.getSweepAngle(0, 90, false), 0.0f); assertEquals(270, mArcSwipeUnderTest.getSweepAngle(90, 180, false), 0.0f); assertEquals(135, mArcSwipeUnderTest.getSweepAngle(45, 270, false), 0.0f); assertEquals(90, mArcSwipeUnderTest.getSweepAngle(90, 0, false), 0.0f); assertEquals(190, mArcSwipeUnderTest.getSweepAngle(280, 90, false), 0.0f); }