Assert.assertEquals(TestInterceptor1.invocationCount, 1);
Assert.assertEquals(instance.getValue(), "test1");
// Cast FooImpl to Foo, testing if the call becoming doSomething(Object)
// breaks the interception
Foo castInstance = (Foo) instance;
castInstance.doSomething("test2");
// Ensure the method call on to doSomethign(Object) was intercepted, and
// value was set
Assert.assertEquals(TestInterceptor1.invocationCount, 2);
Assert.assertEquals(instance.getValue(), "test2");