### Question:
BranchConfiguration { @Bean BranchLoader branchLoader(DefaultConfig defaultConfig, BranchGroup branchGroup, Environment env, NodeStatus nodeStatus) { BranchLoader branchLoader = new BranchLoader(defaultConfig.getBranchPath()); boolean isValidator = Arrays.asList(env.getActiveProfiles()).contains(ActiveProfiles.VALIDATOR); boolean isBsNode = Arrays.asList(env.getActiveProfiles()).contains(ActiveProfiles.BOOTSTRAP); if (isValidator || isBsNode) { return branchLoader; } try { for (GenesisBlock genesis : branchLoader.getGenesisBlockList()) { if (branchGroup.isBranchExist(genesis.getBranchId())) { continue; } BlockChain bc = createBranch(genesis); branchGroup.addBranch(bc); bc.getContractManager().setNodeStatus(nodeStatus); } } catch (Exception e) { log.warn("branchLoader() is failed.", e.getMessage()); } return branchLoader; } @Autowired  BranchConfiguration(DefaultConfig defaultConfig);   }### Answer:
@Test public void branchLoaderTest() throws IOException { JsonObject branchJson = getBranchJson(); Branch branch = getBranchByJsonObj(branchJson); BranchId branchId = branch.getBranchId(); log.debug("branchId : {}", branchId); saveFile(branchId, branchJson); BranchGroup branchGroup = branchConfig.branchGroup(); branchConfig.branchLoader(config, branchGroup, new MockEnvironment(), nodeStatus); File branchDir = new File(config.getBranchPath(), branchId.toString()); FileUtils.deleteQuietly(branchDir); BlockChain blockChain = branchGroup.getBranch(branchId); assertNotNull(blockChain); assertEquals(blockChain.getBranchId(), branchId); assertTransaction(blockChain); }