title: test case not covering in cobertura
body: <pre><code>public class MyUtil {
      public static Properties loadProperties() throws Exception {
          Properties prop = new Properties();
          InputStream inputStream = MyUtil.class.getClassLoader().getResourceAsStream(PROPERTY_FILENAME);
          if (inputStream != null) {
              prop.load(inputStream);
          }
          return prop;
      }
  }
  </code></pre>
  
  <p>I have written test case for the above method, when I ran as test case in eclipse it's passing and when I debug <code>loadProperties()</code> is not getting called and <code>cobertura report</code> is showing as uncovered code.</p>
  
  <pre><code>@RunWith(PowerMockRunner.class)
  @PrepareForTest({ MyUtil.class, Properties.class })
  
  @Test
  public void testLoadProperties() throws Exception{
      String fileName = "application.properties";
      Properties mockProps = PowerMockito.mock(Properties.class);
      PowerMockito.mockStatic(Properties.class);
      PowerMockito.whenNew(Properties.class).withNoArguments().thenReturn(mockProps);
      InputStream mockInputStream = Mockito.mock(InputStream.class);
      PowerMockito.mockStatic(MyUtil.class);
      ClassLoader mockClassLoader = Mockito.mock(ClassLoader.class);
      PowerMockito.when(MyUtil.class.getClassLoader()).thenReturn(mockClassLoader);
      PowerMockito.when(mockClassLoader.getResourceAsStream(fileName)).thenReturn(mockInputStream);
      PowerMockito.doNothing().when(mockProps).load((InputStream)Mockito.any());
      MyUtil.loadProperties();
      //assertNotNull("Not Null", MyUtil.loadProperties()); //assert failing
  }
  </code></pre>
  
  <p>what should I change to make sure that my code actually covers in code coverage?</p>