title: How to cope with tests coverage and impossible reached lines?
body: <p>I'm starting to work with Java and JUnit, and I'm facing some problem with understanding the tips and tricks about code coverage. </p>
  
  <p>If I'm right, the ultimate goal in unit testing classes is to get to a 100% test coverage. </p>
  
  <p>So here is the code that I have right now:</p>
  
  <pre><code>// field is of type Field (from reflection)
  
  field.setAccessible(true);
  try {
      field.get(instance);
  } catch (IllegalAccessException e) {
      e.printStackTrace();
  }
  </code></pre>
  
  <p>So here, you can see that I can't access the catch() block at any time because I make the field Accessible just on top of it... </p>
  
  <p><strong>What is wrong with my code? How can I get a 100% code coverage result when this happens?</strong></p>