title: Gradle 2.3 + JUnit 4.11 = broken Charset
body: <p>Under normal conditions in the correct bytes written to the file, but in conjunction Gradle 2.3 + JUnit 4.11 unexpected result.
  </p>
  
  <pre><code>import org.junit.Test;
  import java.io.FileOutputStream;
  import static org.junit.Assert.*;
  
  public class TestUTF16Test
  {
     @Test
     public void testWrite() throws Exception
     {
        try (FileOutputStream bin = new FileOutputStream("testUTF16junit.txt")) {
           bin.write("Русский".getBytes("UTF-16LE"));
        }
     }
  }
  </code></pre>
  
  <p>build.gradle
  </p>
  
  <pre><code>apply plugin: 'java'
  
  sourceCompatibility = 1.7
  version = '1.0'
  
  repositories {
      mavenCentral()
  }
  
  dependencies {
      testCompile group: 'junit', name: 'junit', version: '4.11'
  }
  </code></pre>
  
  <p>$ gradle.bat :clean :test</p>
  
  <pre><code>:clean
  :compileJavawarning: [options] bootstrap class path not set in conjunction with -source 1.7
  1 warning
  
  :processResources UP-TO-DATE
  :classes
  :compileTestJavawarning: [options] bootstrap class path not set in conjunction with -source 1.7
  1 warning
  
  :processTestResources UP-TO-DATE
  :testClasses
  :test
  
  BUILD SUCCESSFUL
  
  Total time: 4.999 secs
  </code></pre>
  
  <p>Result:</p>
  
  <pre><code>20 04 A0 00 21 04 53 04 21 04 03 04 21 04 03 04... 28 bytes
  </code></pre>
  
  <p>But it should be:</p>
  
  <pre><code>20 04 43 04 41 04 41 04 3A 04 38 04 39 04 = 14 bytes
  </code></pre>
  
  <p>OS: Microsoft Windows 7 [Version 6.1.7601]</p>