Source:
<code>public void testTargetExtremeGCFilter(final List<Target> targets, final double extremeGC) <START> throws IOException <END> { final File targetFile = createTargetFile(targets, Collections.singleton(TargetAnnotation.GC_CONTENT)); final List<Target> leftInTargets = targets.stream() .filter(t -> t.getAnnotations().getDouble(TargetAnnotation.GC_CONTENT) >= extremeGC && t.getAnnotations().getDouble(TargetAnnotation.GC_CONTENT) <= 1 - extremeGC) .collect(Collectors.toList()); final List<Target> leftOutTargets = targets.stream() .filter(t -> t.getAnnotations().getDouble(TargetAnnotation.GC_CONTENT) < extremeGC && t.getAnnotations().getDouble(TargetAnnotation.GC_CONTENT) > 1.0 - extremeGC) .collect(Collectors.toList()); final File outputFile = createTempFile("output", ".tab"); final File rejectionFile = createTempFile("reject", ".tab"); runCommandLine(new String[] { "-" + TargetArgumentCollection.TARGET_FILE_SHORT_NAME, targetFile.getPath(), "-" + StandardArgumentDefinitions.OUTPUT_SHORT_NAME, outputFile.getPath(), "-" + FilterTargets.MAXIMUM_GC_CONTENT_SHORT_NAME, String.valueOf(1.0 - extremeGC), "-" + FilterTargets.MINIMUM_GC_CONTENT_SHORT_NAME, String.valueOf(extremeGC), "-" + FilterTargets.REJECT_OUTPUT_FILE_SHORT_NAME, rejectionFile.getPath(), }); final TargetCollection<Target> outputTargetCollection = TargetArgumentCollection.readTargetCollection(outputFile); final List<Target> outputTargets = outputTargetCollection.targets(); Assert.assertEquals(outputTargets.size(), leftInTargets.size()); for (int i = 0; i < outputTargets.size(); i++) { Assert.assertEquals(outputTargets.get(i), leftInTargets.get(i)); Assert.assertEquals(outputTargets.get(i).getInterval(), leftInTargets.get(i).getInterval()); } checkRejectedTargets(leftOutTargets, rejectionFile, FilterTargets.TargetFilter.ExtremeGCContent); }</code><technical_language>fit lines</technical_language>

Target:
public void testTargetExtremeGCFilter(final List<Target> targets, final double extremeGC) throws IOException { final File targetFile = createTargetFile(targets, Collections.singleton(TargetAnnotation.GC_CONTENT)); final List<Target> leftInTargets = targets.stream() .filter(t -> t.getAnnotations().getDouble(TargetAnnotation.GC_CONTENT) >= extremeGC && t.getAnnotations().getDouble(TargetAnnotation.GC_CONTENT) <= 1 - extremeGC) .collect(Collectors.toList()); final List<Target> leftOutTargets = targets.stream() .filter(t -> t.getAnnotations().getDouble(TargetAnnotation.GC_CONTENT) < extremeGC && t.getAnnotations().getDouble(TargetAnnotation.GC_CONTENT) > 1.0 - extremeGC) .collect(Collectors.toList()); final File outputFile = createTempFile("output", ".tab"); final File rejectionFile = createTempFile("reject", ".tab"); runCommandLine(new String[] { "-" + TargetArgumentCollection.TARGET_FILE_SHORT_NAME, targetFile.getPath(), "-" + StandardArgumentDefinitions.OUTPUT_SHORT_NAME, outputFile.getPath(), "-" + FilterTargets.MAXIMUM_GC_CONTENT_SHORT_NAME, String.valueOf(1.0 - extremeGC), "-" + FilterTargets.MINIMUM_GC_CONTENT_SHORT_NAME, String.valueOf(extremeGC), "-" + FilterTargets.REJECT_OUTPUT_FILE_SHORT_NAME, rejectionFile.getPath(), }); checkLeftInTargets(leftInTargets, outputFile); checkRejectedTargets(leftOutTargets, rejectionFile, FilterTargets.TargetFilter.ExtremeGCContent); }