MissingTranslationsCheck extends DoubleDispatchVisitorCheck { public Map<File, Set<String>> getFileKeys() { return fileKeys; }  @Override void visitProperties(PropertiesTree tree); @Override void visitKey(KeyTree tree); Map<File, Set<String>> getFileKeys();  }
@Test public void test() { MissingTranslationsCheck check = new MissingTranslationsCheck(); File file = CheckTestUtils.getTestFile("missing-translations/message.properties"); scanFile(check, file); Assert.assertNotNull(check.getFileKeys()); Assert.assertEquals(1, check.getFileKeys().size()); Assert.assertEquals(3, check.getFileKeys().get(file).size()); Assert.assertTrue(check.getFileKeys().get(file).contains("myproperty0")); Assert.assertTrue(check.getFileKeys().get(file).contains("myproperty1")); Assert.assertTrue(check.getFileKeys().get(file).contains("myproperty2")); }