@Test public final void shouldReturnValidPasswordWithSpecifiedLenght() throws Exception { int length = 8; String generatedPassword = passwordGeneratorServiceImpl.generatePassword(length); Assert.assertEquals(length, generatedPassword.length()); Assert.assertFalse(generatedPassword.contains(" ")); }
@Override public String generatePassword() { return generatePassword(DEFAULT_PASSWORD_LENGTH); }
PasswordGeneratorServiceImpl implements PasswordGeneratorService { @Override public String generatePassword() { return generatePassword(DEFAULT_PASSWORD_LENGTH); } }
PasswordGeneratorServiceImpl implements PasswordGeneratorService { @Override public String generatePassword() { return generatePassword(DEFAULT_PASSWORD_LENGTH); }  }
PasswordGeneratorServiceImpl implements PasswordGeneratorService { @Override public String generatePassword() { return generatePassword(DEFAULT_PASSWORD_LENGTH); }  @Override String generatePassword(); @Override String generatePassword(final int length); }
PasswordGeneratorServiceImpl implements PasswordGeneratorService { @Override public String generatePassword() { return generatePassword(DEFAULT_PASSWORD_LENGTH); }  @Override String generatePassword(); @Override String generatePassword(final int length);  }