@Override public @Nullable IBinder onBind(final Intent intent) {
		return new Binder() {
			@Override protected boolean onTransact(final int code, final Parcel data, final @Nullable Parcel reply, final int flags) {
				try {
					final Class<?> clazz = Class.forName(Objects.requireNonNull(data.readString()));
					final Constructor<?> constructor = clazz.getDeclaredConstructors()[0];
					constructor.setAccessible(true);
					final Class<?>[] parameter_types = constructor.getParameterTypes();
					final Object[] args = new Object[parameter_types.length];
					for (int i = 0; i < args.length; i++) {
						if (parameter_types[i] == Context.class) args[i] = TestService.this;
						else if (parameter_types[i] == Application.class) args[i] = getApplication();
						else args[i] = data.readValue(getClassLoader());
					}
					final Procedure procedure = (Procedure) constructor.newInstance(args);
					procedure.run(TestService.this);
                    if (reply != null) reply.writeValue(null);
                } catch (final Throwable t) {
                    if (reply != null) reply.writeValue(t);
                }
				return true;
			}
		};
	}
A simple service to mimic the real-world service to be wrapped by {@link com.oasisfeng.condom.CondomProcess CondomProcess}.

Created by Oasis on 2017/10/2.
library/src/androidTest/java/com/oasisfeng/condom/TestService.java