title: LocalDateTime.of returns null
body: <p>I am trying to Unit test code that uses <code>java.time.LocalDateTime</code>. I'm able to get the mock working, however when I add time (either minutes or days) I end up with a <code>null</code> value.</p>
  
  <pre><code>@RunWith(PowerMockRunner.class)
  @PrepareForTest({ LocalDateTime.class })
  public class LocalDateTimeMockTest
  {
      @Test
      public void shouldCorrectlyCalculateTimeout()
      {
          // arrange
          PowerMockito.mockStatic(LocalDateTime.class);
          LocalDateTime fixedPointInTime = LocalDateTime.of(2017, 9, 11, 21, 28, 47);
          BDDMockito.given(LocalDateTime.now()).willReturn(fixedPointInTime);
  
          // act
          LocalDateTime fixedTomorrow = LocalDateTime.now().plusDays(1); //shouldn't this have a NPE?
  
          // assert
          Assert.assertTrue(LocalDateTime.now() == fixedPointInTime); //Edit - both are Null
          Assert.assertNotNull(fixedTomorrow); //Test fails here
          Assert.assertEquals(12, fixedTomorrow.getDayOfMonth());
      }
  }
  </code></pre>
  
  <p>I understand (well I think I do) that <code>LocalDateTime</code> is immutable, and I would think I should get a new instance instead of the <code>null</code> value.</p>
  
  <p>Turns out it is the <code>.of</code> method that is giving me a <code>null</code> value. Why?</p>