### Question:
GenesisImporter { public Block newGenesisBlock() { return new BlockImpl(CREATOR_PUBLIC_KEY, loadBalancesAccountsComputeDigest()); } @Inject  GenesisImporter(
        BlockchainConfig blockchainConfig,
        BlockchainConfigUpdater blockchainConfigUpdater,
        DatabaseManager databaseManager,
        AplAppStatus aplAppStatus,
        GenesisImporterProducer genesisImporterProducer,
        AccountGuaranteedBalanceTable accountGuaranteedBalanceTable,
        AccountTable accountTable,
        ApplicationJsonFactory jsonFactory,
        PropertiesHolder propertiesHolder,
        AccountService accountService,
        AccountPublicKeyService accountPublicKeyService
    ); @PostConstruct void loadGenesisDataFromResources(); Block newGenesisBlock(); @Transactional void importGenesisJson(final boolean loadOnlyPublicKeys); byte[] getCreatorPublicKey(); byte[] getComputedDigest(); static long CREATOR_ID; static long EPOCH_BEGINNING; }### Answer:
@Test void newGenesisBlock() { doReturn("conf/data/genesisParameters.json").when(genesisImporterProducer).genesisParametersLocation(); doReturn("conf/data/genesisAccounts-testnet.json").when(chain).getGenesisLocation(); propertiesHolder.init( getGenesisAccountTotalProperties("10", "10") ); genesisImporter = new GenesisImporter( blockchainConfig, blockchainConfigUpdater, extension.getDatabaseManager(), aplAppStatus, genesisImporterProducer, accountGuaranteedBalanceTable, accountTable, weld.select(ApplicationJsonFactory.class).get(), propertiesHolder, accountService, accountPublicKeyService ); genesisImporter.loadGenesisDataFromResources(); Block block = genesisImporter.newGenesisBlock(); assertNotNull(block); assertEquals(1739068987193023818L, block.getGeneratorId()); assertEquals(4997592126877716673L, block.getId()); assertEquals(0, block.getHeight()); assertEquals("1259ec21d31a30898d7cd1609f80d9668b4778e3d97e941044b39f0c44d2e51b", Convert.toHexString(genesisImporter.getCreatorPublicKey())); assertEquals( "9056ecb5bf764f7513195bc6655756b83e55dcb2c4c2fdb20d5e5aa5348617ed", Convert.toHexString(genesisImporter.getComputedDigest()) ); assertEquals(1739068987193023818L, GenesisImporter.CREATOR_ID); assertEquals(1515931200000L, GenesisImporter.EPOCH_BEGINNING); }
@Test void genesisParamIncorrectPath() { doReturn("conf/unknown_path/genesisParameters.json").when(genesisImporterProducer).genesisParametersLocation(); genesisImporter = new GenesisImporter( blockchainConfig, blockchainConfigUpdater, extension.getDatabaseManager(), aplAppStatus, genesisImporterProducer, accountGuaranteedBalanceTable, accountTable, weld.select(ApplicationJsonFactory.class).get(), propertiesHolder, accountService, accountPublicKeyService ); assertThrows(RuntimeException.class, () -> genesisImporter.newGenesisBlock()); }