SoyMsgBundle msgBundle = (new ExtractMsgsVisitor()).exec(soyTree);
XliffMsgPlugin msgPlugin = new XliffMsgPlugin();
// Test without target language.
OutputFileOptions outputFileOptions = new OutputFileOptions();
CharSequence extractedMsgsFile =
msgPlugin.generateExtractedMsgsFile(msgBundle, outputFileOptions);
URL expectedExtractedMsgsFile = Resources.getResource(
XliffMsgPluginTest.class, "test_data/test-v2_extracted.xlf");
assertEquals(
Resources.toString(expectedExtractedMsgsFile, Charsets.UTF_8),
extractedMsgsFile.toString());
// Test with target language.
outputFileOptions.setTargetLocaleString("x-zz");
extractedMsgsFile = msgPlugin.generateExtractedMsgsFile(msgBundle, outputFileOptions);
expectedExtractedMsgsFile = Resources.getResource(
XliffMsgPluginTest.class, "test_data/test-v2_extracted_x-zz.xlf");
assertEquals(