A1cCalculatorActivity extends AppCompatActivity { @OnTextChanged(value = R.id.activity_converter_a1c_glucose, callback = OnTextChanged.Callback.AFTER_TEXT_CHANGED) void glucoseValueChanged(@NonNull final Editable s) { convertedA1C = presenter.calculateA1C(s.toString()); A1CTextView.setText(String.valueOf(NumberFormat.getInstance().format(convertedA1C))); }  void setMmol(); @Override boolean onKeyUp(int keyCode, KeyEvent event); @Override boolean onKeyDown(int keyCode, KeyEvent event); @Override boolean onCreateOptionsMenu(Menu menu); @Override boolean onOptionsItemSelected(MenuItem item);  }
@Test public void NotifyPresenter_WhenGlucoseValueChanged() throws Exception { String value = "2"; when(editableMock.toString()).thenReturn(value); activity.glucoseValueChanged(editableMock); verify(getA1cCalculatorPresenter()).calculateA1C(value); }