{
// Note: It's important for the following test, that aInterceptor will be hold alive by the uno reference
// xInterceptor. Otherwhise we cant check some internal states of aInterceptor at the end of this method, because
// it was already killed .-)
Interceptor aInterceptor = new Interceptor();
XDispatchProviderInterceptor xInterceptor = UnoRuntime.queryInterface(XDispatchProviderInterceptor.class, aInterceptor);
XFrame xFrame = impl_createNewFrame();
XDispatchProviderInterception xInterception = UnoRuntime.queryInterface(XDispatchProviderInterception.class, xFrame);
xInterception.registerDispatchProviderInterceptor(xInterceptor);
impl_closeFrame(xFrame);
int nRegCount = aInterceptor.getRegistrationCount();
boolean bIsRegistered = aInterceptor.isRegistered();
System.out.println("registration count = " + nRegCount);
System.out.println("is registered ? = " + bIsRegistered);
if (nRegCount < 1)