Navigator { public <T extends Parcelable> void finishActivity(Activity activity, boolean isSuccess, String extraKey, T extra) { HashMap<String, T> extras = new HashMap<>(); extras.put(extraKey, extra); finishActivity(activity, isSuccess, extras); } @Inject  Navigator(); void finishActivity(Activity activity, boolean isSuccess,
      String extraKey, T extra); void finishActivity(Activity activity, boolean isSuccess,
      Map<String, T> extras); void finishActivity(Activity activity); void navigateToServerSearchActivity(Context context); void navigateToServerFoundActivity(Activity activity, final ServerModel serverModel);  }
@Test public void shouldProperlyFinishActivity() throws Exception { navigator.finishActivity(mockActivity); verify(mockActivity, times(1)).finish(); verifyNoMoreInteractions(mockActivity); }