### Question:
EasCodeManager { public List<EasCode> listEasCodes() { try{ return ImmutableList.copyOf(new ArrayList<EasCode>(easCodeCache.get(Boolean.TRUE).values())); }catch (ExecutionException e){ throw new UncheckedExecutionException(e.getCause()); } } EasCodeManager(Resource easCodesResource); List<EasCode> listEasCodes();  }### Answer:
@Test public void testLoadEASCodesAndExpectSizes() throws Exception { assertEquals(easCodeManager.listEasCodes().size(), TEST_EAS_EVENT_CODE_DATA.length); assertValid(easCodeManager.listEasCodes()); }
@Test public void testWatchedEASCodeFileAndExpectSizes() throws Exception { final CountDownLatch latch = new CountDownLatch(1); _EASCodeResource.addWatch(new ResourceListener() { @Override public void onChange() { latch.countDown(); } }); Thread.sleep(1000); String[] inputData = { String.format("%s %s %s", eas4, name4, group4) }; TestUtils.appendLinesToFile(_EASCodeFile, inputData); boolean changeDetected = latch.await(20, TimeUnit.SECONDS); assertTrue(changeDetected); List<EasCode> easCodes = easCodeManager.listEasCodes(); assertTrue(easCodes.contains(EasCodeResourceLoader.stringToEas(inputData[0]))); assertValid(easCodeManager.listEasCodes()); }