public static String resolveRegistryContract(String chainId) {
        final Long chainIdLong = Long.parseLong(chainId);
        if (chainIdLong.equals(ChainIdLong.MAINNET)) {
            return MAINNET;
        } else if (chainIdLong.equals(ChainIdLong.ROPSTEN)) {
            return ROPSTEN;
        } else if (chainIdLong.equals(ChainIdLong.RINKEBY)) {
            return RINKEBY;
        } else if (chainIdLong.equals(ChainIdLong.GOERLI)) {
            return GOERLI;
        } else if (chainIdLong.equals(ChainIdLong.SEPOLIA)) {
            return SEPOLIA;
        } else if (chainIdLong.equals(ChainIdLong.LINEA)) {
            return LINEA;
        } else if (chainIdLong.equals(ChainIdLong.LINEA_SEPOLIA)) {
            return LINEA_SEPOLIA;
        } else {
            throw new EnsResolutionException(
                    "Unable to resolve ENS registry contract for network id: " + chainId);
        }
    }
@Test
    public void testResolveRegistryContractInvalid() {
        assertThrows(
                EnsResolutionException.class, () -> resolveRegistryContract(ChainIdLong.NONE + ""));
    }