### Question:
CayenneRuntime { public static void bindThreadInjector(Injector injector) { threadInjector.set(injector); } protected  CayenneRuntime(Collection<Module> modules); static void bindThreadInjector(Injector injector); static Injector getThreadInjector(); Collection<Module> getModules(); Injector getInjector(); @BeforeScopeEnd void shutdown(); DataChannel getChannel(); ObjectContext newContext(); ObjectContext newContext(DataChannel parentChannel);  }### Answer:
@Test public void testBindThreadInjector() { Injector injector = mock(Injector.class); assertNull(CayenneRuntime.getThreadInjector()); try { CayenneRuntime.bindThreadInjector(injector); assertSame(injector, CayenneRuntime.getThreadInjector()); } finally { CayenneRuntime.bindThreadInjector(null); } assertNull(CayenneRuntime.getThreadInjector()); }