PopUpCoachMarkPresenter { protected void setImageParamsAndPosition(Point anchorTop, Point anchorBottom, int imageWidth, int imageHeight, @ColorRes int backGroundTintForImage, @DrawableRes int imageDrawableRes) { double centerX = (anchorTop.x + anchorBottom.x) / 2; double centerY = (anchorTop.y + anchorBottom.y) / 2; mPresentation.setImageInformation(centerX, centerY, imageWidth, imageHeight, backGroundTintForImage, imageDrawableRes); } 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 setImageParamsAndPositionTest(){ Point anchorTop = new Point(0,0); Point anchorBotom = new Point(100, 100); mPopUpCoachMarkPresenter.setImageParamsAndPosition(anchorTop, anchorBotom, 30, 30, mockedColorRes, mockedDrawableRes); Mockito.verify(mPopUpCoachMarkPresentation, Mockito.times(1)) .setImageInformation(Matchers.anyDouble(), Matchers.anyDouble(),Matchers.anyInt(), Matchers.anyInt(),Matchers.anyInt(), Matchers.anyInt()); Mockito.verifyNoMoreInteractions(mPopUpCoachMarkPresentation); }