@Test public void testValidSuper2() { DerivedClass4 obj = mock(DerivedClass4.class); ReflectiveGenericLifecycleObserver observer = new ReflectiveGenericLifecycleObserver(obj); observer.onStateChanged(mock(LifecycleOwner.class), ON_START); verify(obj).foo(Matchers.<LifecycleOwner>any()); verify(obj).foo(); }
@Override public void onStateChanged(LifecycleOwner source, Event event) { invokeCallbacks(mInfo, source, event); }
ReflectiveGenericLifecycleObserver implements GenericLifecycleObserver { @Override public void onStateChanged(LifecycleOwner source, Event event) { invokeCallbacks(mInfo, source, event); } }
ReflectiveGenericLifecycleObserver implements GenericLifecycleObserver { @Override public void onStateChanged(LifecycleOwner source, Event event) { invokeCallbacks(mInfo, source, event); } ReflectiveGenericLifecycleObserver(Object wrapped); }
ReflectiveGenericLifecycleObserver implements GenericLifecycleObserver { @Override public void onStateChanged(LifecycleOwner source, Event event) { invokeCallbacks(mInfo, source, event); } ReflectiveGenericLifecycleObserver(Object wrapped); @Override void onStateChanged(LifecycleOwner source, Event event); @Override Object getReceiver(); }
ReflectiveGenericLifecycleObserver implements GenericLifecycleObserver { @Override public void onStateChanged(LifecycleOwner source, Event event) { invokeCallbacks(mInfo, source, event); } ReflectiveGenericLifecycleObserver(Object wrapped); @Override void onStateChanged(LifecycleOwner source, Event event); @Override Object getReceiver();  }