SubscriptionChangeHandler extends AsyncHttpResponseHandler { @Override public void onSuccess(int statusCode, Header[] headers, byte[] responseBody) { InterestSubscriptionChange change = subscription.getChange(); InterestSubscriptionChangeListener listener = subscription.getListener(); String interest = subscription.getInterest(); Log.d(TAG, "Successfully sent subscription change " + change + " for interest: " + interest); if (listener != null) listener.onSubscriptionChangeSucceeded(); } SubscriptionChangeHandler(
            Subscription subscription); @Override void onSuccess(int statusCode, Header[] headers, byte[] responseBody); @Override void onFailure(int statusCode, Header[] headers, byte[] responseBody, Throwable error);  }
@Test public void onSuccess() throws Exception { handler.onSuccess(200, null, null); verify(listener).onSubscriptionChangeSucceeded(); }