VIARequisitionFragment extends BaseReportFragment implements VIARequisitionView { private void loadData() { if (isFromSelectEmergencyPage()) { presenter.loadEmergencyData(emergencyStockCards, new Date(LMISApp.getInstance().getCurrentTimeMillis())); } else { presenter.loadData(formId, periodEndDate); } }  @Override void onCreate(Bundle savedInstanceState); @Override View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState); @Override void onViewCreated(View view, Bundle savedInstanceState); void hideOrShowAddProductMenuInVIAPage(); @Override void onCreateOptionsMenu(Menu menu, MenuInflater inflater); @Override boolean onOptionsItemSelected(MenuItem item); @Override void refreshRequisitionForm(RnRForm rnRForm); void setTitleWithPeriod(RnRForm rnRForm); @Override void highLightApprovedAmount(); @Override void highLightRequestAmount(); void setEditable(); @Override void showListInputError(int index); @NonNull Subscriber<RnRForm> getOnSavedSubscriber(); @Override void setProcessButtonName(String buttonName); @Override boolean validateConsultationNumber(); @NonNull @Override String getSignatureDialogTitle(); @Override void completeSuccess(); @Override void onActivityResult(int requestCode, int resultCode, Intent data);  }
@Test public void shouldShowTheCannotInitFormToastWhenTheAllStockMovementsAreNotSyncDown() { reset(presenter); when(presenter.getRnrFormStatus()).thenReturn(RnRForm.STATUS.DRAFT); SharedPreferenceMgr.getInstance().setShouldSyncLastYearStockCardData(true); viaRequisitionFragment = getVIARequisitionFragmentFromActivityWithIntent(); String msg = viaRequisitionFragment.getString(R.string.msg_stock_movement_is_not_ready); assertThat(ShadowToast.getTextOfLatestToast()).isEqualTo(msg); verify(presenter, never()).loadData(anyLong(), any(Date.class)); }