### Question:
ComboPolicy implements Policy { public static BiFunction<String, String, Long> sequences(final int length) { if ( length < 0 ) { throw new IllegalArgumentException("negative length"); } return (user, secret) -> { long count=0L; for (int s=0, e=1, l=secret.length(); e <= l; ++e) { if ( e == l || abs(secret.charAt(e)-secret.charAt(e-1)) > 1 ) { if ( e-s >= length ) { ++count; } s=e; } } return count; }; }  static Policy all(final Policy... policies); static Policy any(final Policy... policies); static Policy no(final BiFunction<String, String, Long> counter); static Policy contains(final BiFunction<String, String, Long> counter); static Policy minimum(final long minimum, final BiFunction<String, String, Long> counter); static Policy maximum(final long maximum, final BiFunction<String, String, Long> counter); static Policy between(final long minimum, final long maximum,
			final BiFunction<String, String, Long> counter); static Policy only(final BiFunction<String, String, Long> counter); static BiFunction<String, String, Long> letters(); static BiFunction<String, String, Long> uppercases(); static BiFunction<String, String, Long> lowercases(); static BiFunction<String, String, Long> digits(); static BiFunction<String, String, Long> controls(); static BiFunction<String, String, Long> specials(); static BiFunction<String, String, Long> blocks(final Character.UnicodeBlock... blocks); static BiFunction<String, String, Long> scripts(final Character.UnicodeScript... scripts); static BiFunction<String, String, Long> characters(); static BiFunction<String, String, Long> characters(final IntPredicate classifier); static BiFunction<String, String, Long> stopwords(final Function<String, Stream<String>> generator); static BiFunction<String, String, Long> sequences(final int length); @Override boolean verify(final String user, final String secret);  }### Answer:
@Test void testSequences() { assertThat(verify("aaa-ZVM-160")) .as("repetition") .isFalse(); assertThat(verify("qyp-ABC-160")) .as("upward") .isFalse(); assertThat(verify("qyp-ZVM-321")) .as("downward") .isFalse(); }