### Question:
ActivityComponentDelegate extends AndroidComponentDelegate { @Override void sendMessage(AppMessage appMessage) { appMessage.updateInternalData(responseInternalData); Activity activity = getActivity(); if (activity != null) { try { ObservableActivityHelper<AppMessage> helper = getHelperFromActivity(activity); helper.sendMessageToClient(appMessage); } catch (NoSuchInstanceException e) { Log.e(TAG, "Failed to retrieve ObservableActivityHelper - was the activity started correctly?"); } } else { Log.e(TAG, "Activity reference no longer available to send message via"); } } ActivityComponentDelegate(Activity activity);   }### Answer:
@Test public void sendMessageShouldSendViaHelper() throws Exception { AppMessage appMessage = new AppMessage("hello"); activityComponentDelegate.sendMessage(appMessage); verify(helper).sendMessageToClient(appMessage); }