### Question:
DependencyBootstrapperImpl implements DependencyBootstrapper { @Override public <T> T getInstanceOf(AdWordsSession session, Class<T> dependencyClass) { Preconditions.checkNotNull(session, "Null session"); Preconditions.checkNotNull(dependencyClass, "Null dependency class"); if (dependencyClass.getAnnotation(SessionUtility.class) != null) { String message = String.format( "%s is annotated with %s. Only types without that annotation can be obtained " + " from this bootstrapper. Use AdWordsServicesInterface.getUtility instead.", dependencyClass, SessionUtility.class); throw new IllegalArgumentException(message); } Injector childInjector = injector.createChildInjector(new AdWordsSessionModule(session)); return childInjector.getInstance(dependencyClass); } @Inject  DependencyBootstrapperImpl(Injector injector); @Override T getInstanceOf(AdWordsSession session, Class<T> dependencyClass);  }### Answer:
@Test public void testGetNonSessionUtility() { HttpTransport httpTransport = bootstrapper.getInstanceOf(session, HttpTransport.class); assertThat(httpTransport, Matchers.instanceOf(NetHttpTransport.class)); }
@Test public void testGetSessionUtility_fails() { thrown.expect(IllegalArgumentException.class); thrown.expectMessage("SessionUtility"); bootstrapper.getInstanceOf(session, MockSessionUtility.class); }