@Test
public void testDifferentPlatformEncoding() throws Exception {
PartialBootstrapTask task = new PartialBootstrapTask("", "", "website.testPartialBootstrapWithUtf8.xml", "/testPartialBootstrapWithUtf8/level1/level2");
String originalPlatformEncoding = System.getProperty("file.encoding");
System.setProperty("file.encoding", "ISO-8859-1");
Field charset = Charset.class.getDeclaredField("defaultCharset");
charset.setAccessible(true);
charset.set(null, null);
assertEquals("ISO-8859-1", System.getProperty("file.encoding"));
task.execute(ctx);
assertTrue(session.itemExists("/testPartialBootstrapWithUtf8"));
assertTrue(session.itemExists("/testPartialBootstrapWithUtf8/level1/level2"));
System.setProperty("file.encoding", originalPlatformEncoding);
charset = Charset.class.getDeclaredField("defaultCharset");
charset.setAccessible(true);
charset.set(null, null);
}