PopUpCoachMarkPresenter { @PopUpPosition protected int findCoachMarkTextPopUpDisplayPosition(Point anchorTop, Point anchorBottom, @PopUpPosition int defaultPopUpPosition, CoachMarkPixelInfo coachMarkDimenInPixel) { int centerX = (anchorTop.x + anchorBottom.x) / 2; int centerY = (anchorTop.y + anchorBottom.y) / 2; Point centerViewPoint = new Point(centerX, centerY); return getDisplayPosition(centerViewPoint, defaultPopUpPosition, coachMarkDimenInPixel); } PopUpCoachMarkPresenter(final IStringResourceProvider stringResourceProvider,
                                   final IDimensionResourceProvider dimensionResourceProvider,
                                   final ITypeFaceProvider typeFaceProvider,
                                   final IScreenInfoProvider screenInfoProvider); void onCreate(CoachMarkBuilder coachMarkBuilder); void onCreateView(IPopUpCoachMarkPresentation popUpCoachMarkPresentation); void onViewCreated(); void onDestroyView(); void onDestroy(); void onOkButtonClicked(); void onShimClicked();  }
@Test public void findCoachMarkTextPopUpDisplayPositionTest(){ MockedPoint pointTop = new MockedPoint(400, 0); MockedPoint pointBottom = new MockedPoint(600,600); assertEquals(PopUpPosition.RIGHT, mPopUpCoachMarkPresenter. findCoachMarkTextPopUpDisplayPosition(pointTop, pointBottom, PopUpPosition.RIGHT, mCoachMarkPixelInfo)); }