UaaRandomStringUtilImpl implements UaaRandomStringUtil { @Override public String getSecureRandom(final int length) { return RandomStringUtils.random( length, 0, CHARS.length, true, true, CHARS, secureRandom); } UaaRandomStringUtilImpl(); @Override String getSecureRandom(final int length);  }
@Test void invalidLength() { assertThrows(IllegalArgumentException.class, () -> uaaRandomStringUtil.getSecureRandom(-1)); }