title: mock java.nio.file.Paths.get do nothing but throw InvalidPathException
body: <p>I have two line of code:</p>
  
  <pre><code>File file = new File("report_はな.html");
  Path path = Paths.get(file.getCanonicalPath());
  </code></pre>
  
  <p>Is there anyway that I can mock the static method: </p>
  
  <pre><code>Paths.get(file.getCanonicalPath());
  </code></pre>
  
  <p>And only throw the exception InvalidPathException?</p>
  
  <p>I tried the powermockito, but it seems does not working</p>
  
  <pre><code>PowerMockito.mockStatic(Paths.class);
  PowerMockito.doReturn(null).doThrow(new InvalidPathException("","")).when(Paths.class);
  </code></pre>
  
  <p>The whole idea is I am trying to reproduce the bug that Under the English Mac, the Mac default encoding setting is US-ASCII, which Path path = Paths.get("report_はな.html"); will throw this InvalidPathException.</p>