### Question:
LongParameterListDetector extends CodeSmellDetector { public Metric createMetric(final int val) { return new Metric(nop.name(), val); } LongParameterListDetector(@NonNull final Environment environment,
			final int threshold);  LongParameterListDetector(Environment environment); @Override void visitRoot(final CtElement element); @Override void visitCtMethod(final CtMethod<T> method); @Override void visitCtConstructor(final CtConstructor<T> constructor); @Override CodeSmell.Definition getDefinition(); Metric createMetric(final int val); static final int DEFAULT_THRESHOLD; }### Answer:
@Test public void test001() throws IOException { RevisionMock revision = new RevisionMock(folder); revision.addFile(Paths.get("lpl", "LongParameterList.java")); RevisionRange revisionRange = mock(RevisionRange.class); when(revisionRange.getRevision()).thenReturn(revision); Launcher launcher = new Launcher(); launcher.addInputResource(folder.getRoot().getAbsolutePath()); CtModel model = launcher.buildModel(); Environment environment = new Environment(model, revisionRange); LongParameterListDetector lplDetector = new LongParameterListDetector(environment, 2); lplDetector.scan(model); List<CodeSmell> codeSmells = lplDetector.getCodeSmells(); assertThat(codeSmells).hasSize(1); CodeSmell codeSmell = codeSmells.get(0); assertThat(codeSmell.getMetrics()).containsOnlyOnce( lplDetector.createMetric(6)); assertThat(codeSmell.getRanges()).hasSize(1).first() .matches(range -> range.getBegin().getLine() == 7) .matches(range -> range.getBegin().getColumn() == 13) .matches(range -> range.getEnd().getLine() == 8) .matches(range -> range.getEnd().getColumn() == 39); }