### Question:
OrientationUtils { public static int toClosestRightAngle(int degrees) { boolean roundUp = degrees % 90 > 45; int roundAppModifier = roundUp ? 1 : 0; return (((degrees / 90) + roundAppModifier) * 90) % 360; }  static int toClosestRightAngle(int degrees); static int computeDisplayOrientation(int screenRotationDegrees,
                                                int cameraRotationDegrees,
                                                boolean cameraIsMirrored); static int computeImageOrientation(int screenRotationDegrees,
                                              int cameraRotationDegrees,
                                              boolean cameraIsMirrored);  }### Answer:
@Test public void toClosestRightAngle_0() throws Exception { assertEquals( 0, OrientationUtils.toClosestRightAngle(5) ); }
@Test public void toClosestRightAngle_90() throws Exception { assertEquals( 90, OrientationUtils.toClosestRightAngle(60) ); }
@Test public void toClosestRightAngle_180() throws Exception { assertEquals( 180, OrientationUtils.toClosestRightAngle(190) ); }
@Test public void toClosestRightAngle_270() throws Exception { assertEquals( 270, OrientationUtils.toClosestRightAngle(269) ); }
@Test public void toClosestRightAngle_360() throws Exception { assertEquals( 0, OrientationUtils.toClosestRightAngle(359) ); }