### Question:
BlockchainConfig { public void updateChain(Chain chain, int minPrunableLifetime, int maxPrunableLifetime) { Objects.requireNonNull(chain, "Chain cannot be null"); setFields(chain, minPrunableLifetime, maxPrunableLifetime); Map<Integer, BlockchainProperties> blockchainProperties = chain.getBlockchainProperties(); if (blockchainProperties.isEmpty() || blockchainProperties.get(0) == null) { throw new IllegalArgumentException("Chain has no initial blockchain properties at height 0! ChainId = " + chain.getChainId()); } heightConfigMap = blockchainProperties.values() .stream() .map(HeightConfig::new) .sorted(Comparator.comparing(HeightConfig::getHeight)) .collect(Collectors.toMap(HeightConfig::getHeight, Function.identity(), (old, newv)-> newv, LinkedHashMap::new)); currentConfig = heightConfigMap.get(0); LOG.debug("Switch to chain {} - {}. ChainId - {}", chain.getName(), chain.getDescription(), chain.getChainId()); } BlockchainConfig();  BlockchainConfig(Chain chain, PropertiesHolder holder); void updateChain(Chain chain, int minPrunableLifetime, int maxPrunableLifetime); HeightConfig getConfigAtHeight(int targetHeight); String getProjectName(); String getAccountPrefix(); String getCoinSymbol(); int getLeasingDelay(); int getMinPrunableLifetime(); short getShufflingProcessingDeadline(); long getLastKnownBlock(); long getUnconfirmedPoolDepositAtm(); long getShufflingDepositAtm(); int getGuaranteedBalanceConfirmations(); boolean isEnablePruning(); int getMaxPrunableLifetime(); Integer getDexPendingOrdersReopeningHeight(); Integer getDexExpiredContractWithFinishedPhasingHeightAndStep3(); HeightConfig getCurrentConfig(); void setCurrentConfig(HeightConfig currentConfig); Chain getChain(); Optional<HeightConfig> getPreviousConfig(); boolean isJustUpdated(); void resetJustUpdated();  }### Answer:
@Test void testCreateBlockchainConfigFromEmptyChain() { Chain emptyChain = new Chain(UUID.randomUUID(), new ArrayList<>(), "Empty", "Empty chain", "EMP", "EM", "EMP", "", List.of()); assertThrows(IllegalArgumentException.class, () -> blockchainConfig.updateChain(emptyChain)); }
@Test void testCreateBlockchainConfigFromChainWithoutZeroHeightConfig() { Chain chainWithoutZeroConfig = chain.copy(); chainWithoutZeroConfig.setBlockchainProperties(Map.of(100, bp1, 200, bp2, 300, bp3)); assertThrows(IllegalArgumentException.class, () -> blockchainConfig.updateChain(chainWithoutZeroConfig)); }