PopUpCoachMarkPresenter { protected int getMarginLeftForNotch(double notchPosition, int popUpWidth, int notchDimen) { if (notchPosition > MAX_NOTCH_RANGE) { notchPosition = MAX_NOTCH_RANGE; } if (notchPosition <= MIN_NOTCH_RANGE) { notchPosition = MIN_NOTCH_RANGE; } int marginLeft = (int) (popUpWidth * notchPosition); if (marginLeft > popUpWidth - notchDimen) { return (popUpWidth - notchDimen); } return marginLeft; } 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 getMarginLeftForNotchTest() { assertEquals(140, mPopUpCoachMarkPresenter.getMarginLeftForNotch (.75, 190, 50)); assertEquals(25, mPopUpCoachMarkPresenter.getMarginLeftForNotch (.25, 100, 25)); }