PermissionEvent implements Event { @Override public void process(Context context, Intent intent) { Bundle response = intent.getExtras(); mListener.onResponse(response); } PermissionEvent(SimpleListener listener); @Override String filter(); @Override void process(Context context, Intent intent);  }
@Test public void process() throws Exception { mIntent.putExtra("key", "val"); mEventFilter.process(mContext, mIntent); verify(mSimpleListener).onResponse(mBundleCaptor.capture()); assertThat(mBundleCaptor.getValue().getString("key"), is("val")); }