### Question:
GitProctorStoreFactory implements TrunkQaProdStoresFactory { ProctorStore createStoreWithGlobalCache(final String branchName, final ProctorStore store) { if (globalCacheStore == null) { LOGGER.info("Global cache is disabled"); return store; } final Environment environment = Environment.fromName(branchName); Preconditions.checkNotNull( environment, "branch name" + branchName + " should be trunk, qa, or production" ); return new GlobalCachingProctorStore(store, globalCacheStore, environment); } @Deprecated  GitProctorStoreFactory(final ScheduledExecutorService executor,
                                  final long gitRefreshSeconds,
                                  final String gitUrl,
                                  final String gitUsername,
                                  final String gitPassword,
                                  final String testDefinitionsDirectory,
                                  final String tempRootDirectory,
                                  final int gitDirectoryLockTimeoutSeconds,
                                  final int gitPullPushTimeoutSeconds,
                                  final int gitCloneTimeoutSeconds,
                                  final boolean gitCleanInitialization);  GitProctorStoreFactory(final String gitUrl,
                                  final String gitUsername,
                                  final String gitPassword,
                                  final String testDefinitionsDirectory,
                                  final String tempRootDirectory,
                                  final int gitDirectoryLockTimeoutSeconds,
                                  final int gitPullPushTimeoutSeconds,
                                  final int gitCloneTimeoutSeconds,
                                  final boolean gitCleanInitialization
    );  GitProctorStoreFactory(final String gitUrl,
                                  final String gitUsername,
                                  final String gitPassword,
                                  final String testDefinitionsDirectory,
                                  final String tempRootDirectory,
                                  final int gitDirectoryLockTimeoutSeconds,
                                  final int gitPullPushTimeoutSeconds,
                                  final int gitCloneTimeoutSeconds,
                                  final boolean gitCleanInitialization,
                                  final GlobalCacheStore globalCacheStore
    ); ProctorStore getTrunkStore(); ProctorStore getQaStore(); ProctorStore getProductionStore(); ProctorStore createStore(final String relativePath);  }### Answer:
@Test public void testCreateStoreWithoutGlobalCache() throws IOException { final GitProctorStoreFactory gitProctorStoreFactoryWithoutGlobalCache = createGitProctorStoreFactory(null); final ProctorStore store = gitProctorStoreFactoryWithoutGlobalCache.createStoreWithGlobalCache("trunk", proctorStore); assertThat(store).isNotInstanceOf(GlobalCachingProctorStore.class); }
@Test public void testCreateStoreWithGlobalCache() { final ProctorStore store = gitProctorStoreFactory.createStoreWithGlobalCache("trunk", proctorStore); assertThat(store).isInstanceOf(GlobalCachingProctorStore.class); }
@Test public void testCreateStoreWithInvalidBranch() { expectedException.expect(NullPointerException.class); gitProctorStoreFactory.createStoreWithGlobalCache("unknown", proctorStore); }