MultiplePermissionListenerThreadDecorator implements MultiplePermissionsListener { @Override public void onPermissionRationaleShouldBeShown( final List<PermissionRequest> permissions, final PermissionToken token) { thread.execute(new Runnable() { @Override public void run() { listener.onPermissionRationaleShouldBeShown(permissions, token); } }); } MultiplePermissionListenerThreadDecorator(MultiplePermissionsListener listener,
      Thread thread); @Override void onPermissionsChecked(final MultiplePermissionsReport report); @Override void onPermissionRationaleShouldBeShown(
      final List<PermissionRequest> permissions, final PermissionToken token);  }
@Test public void onPermissionRationaleShouldBeShownThenListenerIsDecorated() { decorator.onPermissionRationaleShouldBeShown(PERMISSIONS, TOKEN); verify(listener).onPermissionRationaleShouldBeShown(PERMISSIONS, TOKEN); assertTrue(thread.decorated); }