JsTopicControlsTools { public JsTopicControls getJsTopicControlsFromProxyClass(Class<?> proxy) { Class<?> realClass = unProxyClassServices.getRealClass(proxy); return realClass.getAnnotation(JsTopicControls.class); }  JsTopicControls getJsTopicControlsFromProxyClass(Class<?> proxy);  }
@Test public void testGetJsTopicControlsFromProxyClass() { System.out.println("getJsTopicControlsFromProxyClass"); Class proxy = String.class; when(unProxyClassServices.getRealClass(eq(String.class))).thenReturn((Class) String.class).thenReturn((Class) RealClass.class); JsTopicControls result = instance.getJsTopicControlsFromProxyClass(proxy); assertThat(result).isNull(); result = instance.getJsTopicControlsFromProxyClass(proxy); assertThat(result).isNotNull(); }