@Override public void sendIQ(Stanza stanza, Type type, Object bean, ICommCallback callback) { if (bean instanceof PersonalisationManagerBean) { ActionBean actionBean = new ActionBean(); actionBean.setParameterName(((PersonalisationManagerBean) bean).getParameterName()); actionBean.setServiceID(((PersonalisationManagerBean) bean).getServiceId()); actionBean.setServiceType(((PersonalisationManagerBean) bean).getServiceType()); actionBean.setValue("mockValue"); callback.receiveResult(stanza, actionBean); Log.d(TAG, "Sent actionBean mocking a return from the cloud node"); } else { callback.receiveResult(stanza, null); Log.d( TAG, "Sent null bean mocking a return from the cloud node as the bean received in sendIQ was not of type: " + PersonalisationManagerBean.class.getName()); } }