### Question:
Contracts { public static String resolveRegistryContract(String chainId) { switch (Byte.valueOf(chainId)) { case ChainId.MAINNET: return MAINNET; case ChainId.TESTNET: return TESTNET; default: throw new EnsResolutionException( "Unable to resolve ENS registry contract for network id: " + chainId); } }  static String resolveRegistryContract(String chainId); static final String MAINNET; static final String TESTNET; }### Answer:
@Test public void testResolveRegistryContract() { assertThat(resolveRegistryContract(ChainId.MAINNET + ""), is(MAINNET)); assertThat(resolveRegistryContract(ChainId.TESTNET + ""), is(TESTNET)); }
@Test(expected = EnsResolutionException.class) public void testResolveRegistryContractInvalid() { resolveRegistryContract(ChainId.NONE + ""); }