### Question:
ViewExportedVariablesServlet extends HttpServlet { @VisibleForTesting static Stream<String> alphanumericNGrams(@Nullable final String in, final int n) { if (in == null) { return Stream.empty(); } return NON_ALPHANUMERIC .splitAsStream(in.toLowerCase(Locale.US)) .flatMap(alnumSubString -> IntStream .rangeClosed(0, alnumSubString.length() - n) .mapToObj(i -> alnumSubString.substring(i, i + n)) ); }  @Override void init(final ServletConfig servletConfig);  }### Answer:
@Test public void alphanumericNGrams() { assertEquals(0, ViewExportedVariablesServlet.alphanumericNGrams(null, 1).count()); assertEquals(0, ViewExportedVariablesServlet.alphanumericNGrams("zzz", 42).count()); assertEquals( Arrays.asList("m", "1", "3", "b", "i", "t", "r", "i"), ViewExportedVariablesServlet .alphanumericNGrams("m1-3-/bi<</tri", 1) .collect(Collectors.toList()) ); assertEquals( Arrays.asList("m1", "bi", "tr", "ri"), ViewExportedVariablesServlet .alphanumericNGrams("m1-3-/bi<</tri", 2) .collect(Collectors.toList()) ); assertEquals( Arrays.asList( "m1x", "1x3", "x3d", "3dc", "dca", "cas", "ase", "tri", "tri" ), ViewExportedVariablesServlet .alphanumericNGrams("m1x3dCaSe-1-/bi<</tri?tri", 3) .collect(Collectors.toList()) ); }