### Question:
EnsResolver { public String reverseResolve(String address) { if (WalletUtils.isValidAddress(address)) { String reverseName = Numeric.cleanHexPrefix(address) + REVERSE_NAME_SUFFIX; PublicResolver resolver = obtainPublicResolver(reverseName); byte[] nameHash = NameHash.nameHashAsBytes(reverseName); String name = null; try { name = resolver.name(nameHash).send(); } catch (Exception e) { throw new RuntimeException("Unable to execute Moac request", e); } if (!isValidEnsName(name)) { throw new RuntimeException("Unable to resolve name for address: " + address); } else { return name; } } else { throw new EnsResolutionException("Address is invalid: " + address); } } EnsResolver(Chain3j chain3j, long syncThreshold);  EnsResolver(Chain3j chain3j); void setSyncThreshold(long syncThreshold); long getSyncThreshold(); PublicResolver obtainPublicResolver(String ensName); String resolve(String contractId); String reverseResolve(String address); static boolean isValidEnsName(String input);  }### Answer:
@Test public void testReverseResolve() throws Exception { configureSyncing(false); configureLatestBlock(System.currentTimeMillis() / 1000); NetVersion netVersion = new NetVersion(); netVersion.setResult(Byte.toString(ChainId.MAINNET)); String resolverAddress = "0x0000000000000000000000004c641fb9bad9b60ef180c31f56051ce826d21a9a"; String contractName = "0x0000000000000000000000000000000000000000000000000000000000000020" + TypeEncoder.encode(new Utf8String("chain3j.eth")); System.err.println(contractName); McCall resolverAddressResponse = new McCall(); resolverAddressResponse.setResult(resolverAddress); McCall contractNameResponse = new McCall(); contractNameResponse.setResult(contractName); when(chain3jService.send(any(Request.class), eq(NetVersion.class))) .thenReturn(netVersion); when(chain3jService.send(any(Request.class), eq(McCall.class))) .thenReturn(resolverAddressResponse); when(chain3jService.send(any(Request.class), eq(McCall.class))) .thenReturn(contractNameResponse); assertThat(ensResolver.reverseResolve("0x19e03255f667bdfd50a32722df860b1eeaf4d635"), is("chain3j.eth")); }