Build opennms on windows and try to run some of the unit tests that create files.
Inside JUnitCollectorExectionListener.beforeTestMethod(), m_snmpRrdDirectory would have a path like C:\Users\roskens\AppData\Local\Temp\FileAnticipator_temp_1311971314792_007fcb8036ea13fd\snmp. But when we run the unit test configurations through the ConfigurationTestUtils class, the replacement ends up with C:\UsersroskensAppDataLocalTempFileAnticipator_temp_1311971314792_007fcb8036ea13fdsnmp\. So then later on the unit test fails because the its looking for the files under the real path, not the mashed up path.
ConfigurationTestUtils.getConfigForResourceWithReplacements() does a replaceAll() which is where the problem is. The issue is that it does not deal
One solution would be to wrap replacement with Matcher.quoteReplacement() so that \'s and $'s are escaped properly for windows.
String newConfig = buffer.toString();
for (String replacement : replacements)
It appears that the only problematic references to ConfigurationTestUtils methods which call getConfigForResourceWithReplacements() directly or indirectly are in the JUnitCollectorExecutionListener class, another solution would be to update the calls there.