### Question:
BoonServiceMethodCallHandler implements ServiceMethodHandler { @Override public void init( Object service, String rootAddress, String serviceAddress, SendQueue<Response<Object>> responseSendQueue) { this.responseSendQueue = responseSendQueue; this.service = service; classMeta = (ClassMeta<Class<?>>) ClassMeta.classMeta(service.getClass()); addresses.add(Str.add(rootAddress, "/", classMeta.longName())); addresses.add(Str.add(rootAddress, "/", classMeta.longName().toLowerCase())); if (Str.isEmpty(serviceAddress)) { serviceAddress = readAddressFromAnnotation(classMeta); } if (Str.isEmpty(serviceAddress)) { serviceAddress = Str.camelCaseLower(classMeta.name()); } this.name = readNameFromAnnotation(classMeta); if (Str.isEmpty(name)) { this.name = Str.uncapitalize(classMeta.name()); } if (serviceAddress.endsWith("/")) { serviceAddress = Str.slc(serviceAddress, 0, -1); } if (!Str.isEmpty(rootAddress)) { if (rootAddress.endsWith("/")) { rootAddress = Str.slc(rootAddress, 0, -1); } if (serviceAddress.startsWith("/")) { this.address = Str.add(rootAddress, serviceAddress); } else { this.address = Str.add(rootAddress, "/", serviceAddress); } } else { this.address = serviceAddress; } final Iterable<MethodAccess> methods = classMeta.methods(); for (MethodAccess methodAccess : methods) { final AnnotationData listen = getListenAnnotation(methodAccess); if (listen == null) { continue; } String channel = listen.getValues().get("value").toString(); eventMap.put(channel, methodAccess); } final Class<?>[] interfaces = classMeta.cls().getInterfaces(); for (Class<?> interfaceClass : interfaces) { if (interfaceClass.getName().equals("groovy.lang.GroovyObject")) continue; final ClassMeta<?> interfaceMeta = ClassMeta.classMeta(interfaceClass); final AnnotationData channelAnnotation = interfaceMeta.annotation(AnnotationUtils.EVENT_CHANNEL_ANNOTATION_NAME); if (channelAnnotation == null) { continue; } final String classEventBusName = getClassEventChannelName(interfaceMeta, channelAnnotation); interfaceMeta.methods().forEach(methodAccess -> { AnnotationData methodAnnotation = methodAccess.annotation(AnnotationUtils.EVENT_CHANNEL_ANNOTATION_NAME); String methodEventBusName = methodAnnotation != null && methodAnnotation.getValues().get("value") != null ? methodAnnotation.getValues().get("value").toString() : null; if (Str.isEmpty(methodEventBusName)) { methodEventBusName = methodAccess.name(); } final String channelName = createChannelName(null, classEventBusName, methodEventBusName); eventMap.put(channelName, methodAccess); }); } readMethodMetaData(); initQueueHandlerMethods(); } BoonServiceMethodCallHandler(final boolean invokeDynamic); @Override Response<Object> receiveMethodCall(MethodCall<Object> methodCall); boolean couldHaveCallback(final String name); @Override void init(
            Object service,
            String rootAddress,
            String serviceAddress,
            SendQueue<Response<Object>> responseSendQueue); @Override void init(); @Override void startBatch(); @Override TreeSet<String> addresses(); @Override void handleEvent(Event<Object> event); @Override String address(); @Override String name(); @Override void receive(MethodCall<Object> item); @Override void empty(); @Override void limit(); @Override void shutdown(); @Override void idle();  }### Answer:
@Test public void testInit() { class MyService { boolean called; @QueueCallback(QueueCallbackType.INIT) private void init() { called = true; } } MyService myService = new MyService(); final BoonServiceMethodCallHandler boonServiceMethodCallHandler = new BoonServiceMethodCallHandler(true); boonServiceMethodCallHandler.init(myService, "", "", new SendQueue<Response<Object>>() { }); boonServiceMethodCallHandler.limit(); boonServiceMethodCallHandler.empty(); boonServiceMethodCallHandler.startBatch(); boonServiceMethodCallHandler.shutdown(); boonServiceMethodCallHandler.idle(); assertFalse(myService.called); boonServiceMethodCallHandler.init(); assertTrue(myService.called); }