### Question:
AbstractCompilerAdder { protected boolean hasListingLocationDefined() { return listingLocation != null; }    }### Answer:
@Test public void testHasListingLocationDefined() { final File listingLocation = mock(File.class); assertThat(adder.hasListingLocationDefined()).isFalse(); adder.setListingLocation(listingLocation); assertThat(adder.hasListingLocationDefined()).isTrue(); }