### Question:
ConnectorUtils { static Optional<InputStream> getStreamForMappingsFile(String filePath) { return Optional.ofNullable(ConnectorUtils.class.getResourceAsStream(filePath)); }    }### Answer:
@Test public void getStreamReturnsEmpty_whenNoSuchFile() { Optional<InputStream> fileStream = ConnectorUtils.getStreamForMappingsFile("/blah"); assertThat(fileStream).isEmpty(); }
@Test public void getStreamReturnsStream_whenFileExists() { Optional<InputStream> fileStream = ConnectorUtils.getStreamForMappingsFile(MAPPINGS_FILE); assertThat(fileStream).isPresent(); }