### Question:
EnsResolver { boolean isSynced() throws Exception { EthSyncing ethSyncing = web3j.ethSyncing().send(); if (ethSyncing.isSyncing()) { return false; } else { EthBlock ethBlock = web3j.ethGetBlockByNumber(DefaultBlockParameterName.LATEST, false).send(); long timestamp = ethBlock.getBlock().getTimestamp().longValueExact() * 1000; return System.currentTimeMillis() - syncThreshold < timestamp; } } EnsResolver(Web3j web3j, long syncThreshold);  EnsResolver(Web3j web3j); 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 testIsSyncedSyncing() throws Exception { configureSyncing(true); assertFalse(ensResolver.isSynced()); }
@Test public void testIsSyncedFullySynced() throws Exception { configureSyncing(false); configureLatestBlock(System.currentTimeMillis() / 1000); assertTrue(ensResolver.isSynced()); }
@Test public void testIsSyncedBelowThreshold() throws Exception { configureSyncing(false); configureLatestBlock((System.currentTimeMillis() / 1000) - DEFAULT_SYNC_THRESHOLD); assertFalse(ensResolver.isSynced()); }