### Question:
BeaconMapBackground { public static Point getShiftedPoint(@NonNull Point referencePoint, double distanceInPixels, double bearing) { double angleInRadians = Math.toRadians(bearing + 90); return new Point( (int) (referencePoint.x - (distanceInPixels * Math.cos(angleInRadians))), (int) (referencePoint.y - (distanceInPixels * Math.sin(angleInRadians))) ); } private  BeaconMapBackground(Bitmap imageBitmap); Location getLocation(@NonNull Point point); Point getPoint(@NonNull Location location); static float getMetersPerPixel(@NonNull Location firstReferenceLocation, @NonNull Point firstReferencePoint, @NonNull Location secondReferenceLocation, @NonNull Point secondReferencePoint); static double getBearing(@NonNull Location firstReferenceLocation, @NonNull Point firstReferencePoint, @NonNull Location secondReferenceLocation, @NonNull Point secondReferencePoint); static double getBearing(@NonNull Point firstPoint, @NonNull Point secondPoint); static double getBearing(@NonNull Location firstLocation, @NonNull Location secondLocation); static double getPixelDistance(@NonNull Point firstPoint, @NonNull Point secondPoint); static Location getLocation(@NonNull Point point, @NonNull Location referenceLocation, @NonNull Point referencePoint, double metersPerPixel, double backgroundBearing); static Point getPoint(@NonNull Location location, @NonNull Location referenceLocation, @NonNull Point referencePoint, double metersPerPixel, double backgroundBearing); static Point getShiftedPoint(@NonNull Point referencePoint, double distanceInPixels, double bearing); Bitmap getImageBitmap(); double getMetersPerPixel(); void setMetersPerPixel(double metersPerPixel); double getBearing(); void setBearing(double bearing); Location getTopLeftLocation(); void setTopLeftLocation(@NonNull Location topLeftLocation); Location getBottomRightLocation(); void setBottomRightLocation(@NonNull Location bottomRightLocation); Point getTopLeftPoint(); void setTopLeftPoint(@NonNull Point topLeftPoint); Point getBottomRightPoint(); void setBottomRightPoint(@NonNull Point bottomRightPoint);  }### Answer:
@Test public void getShiftedPoint_zeroReference_correctPoints() { Point referencePoint; Point shiftedPoint; double distance; double angle; referencePoint = new Point(0, 0); distance = 10; angle = 0; shiftedPoint = BeaconMapBackground.getShiftedPoint(referencePoint, distance, angle); assertPointEquals(new Point(0, -10), shiftedPoint, 0); angle = 90; shiftedPoint = BeaconMapBackground.getShiftedPoint(referencePoint, distance, angle); assertPointEquals(new Point(10, 0), shiftedPoint, 0); angle = 180; shiftedPoint = BeaconMapBackground.getShiftedPoint(referencePoint, distance, angle); assertPointEquals(new Point(0, 10), shiftedPoint, 0); angle = 270; shiftedPoint = BeaconMapBackground.getShiftedPoint(referencePoint, distance, angle); assertPointEquals(new Point(-10, 0), shiftedPoint, 0); }
@Test public void getShiftedPoint_positiveReference_correctPoints() { Point referencePoint; Point shiftedPoint; double distance; double angle; referencePoint = new Point(100, 100); distance = 50; angle = 0; shiftedPoint = BeaconMapBackground.getShiftedPoint(referencePoint, distance, angle); assertPointEquals(new Point(100, 50), shiftedPoint, 0); angle = 90; shiftedPoint = BeaconMapBackground.getShiftedPoint(referencePoint, distance, angle); assertPointEquals(new Point(150, 100), shiftedPoint, 0); angle = 180; shiftedPoint = BeaconMapBackground.getShiftedPoint(referencePoint, distance, angle); assertPointEquals(new Point(100, 150), shiftedPoint, 0); angle = 270; shiftedPoint = BeaconMapBackground.getShiftedPoint(referencePoint, distance, angle); assertPointEquals(new Point(50, 100), shiftedPoint, 0); }