### Question:
FindBugsPlugin extends Plugin { public static boolean isFindBugs2x(final MojoExecution mojoExecution) { try { String[] versions = StringUtils.split(mojoExecution.getVersion(), "."); if (versions.length > 1) { int major = Integer.parseInt(versions[0]); int minor = Integer.parseInt(versions[1]); return major > 2 || (major == 2 && minor >= 4); } } catch (Throwable exception) { } return false; }  @Override void start(); static boolean isFindBugs2x(final MojoExecution mojoExecution);  }### Answer:
@Test public void testNoSuchMethodError() { MojoExecution execution = mock(MojoExecution.class); when(execution.getVersion()).thenThrow(new NoSuchMethodError()); assertFalse(WRONG_MAVEN_DETECTION, FindBugsPlugin.isFindBugs2x(execution)); }