void () { TestRepository repository = new TestRepository(); repository.setUrl("http://server"); repository.setUsername("me"); String password = "foo"; repository.setEncodedPassword(PasswordUtil.encodePassword(password)); repository.initializeRepository(); assertEquals(password, repository.getPassword()); assertNull(repository.getEncodedPassword()); }