Settings { public boolean userHasAgreedToLicense() { return userHasAgreedToLicense; } Settings(EncryptorSettings encryptorSettings, boolean userHasAgreedToLicense);  Settings(); EncryptorSettings getEncryptorSettings(); boolean userHasAgreedToLicense(); Settings withUserHasAgreedToLicense(boolean userHasAgreedToLicense); Settings withEncryptorSettings(EncryptorSettings encryptorSettings);  }
@Test public void userHasAgreedToLicense() { Settings settings = new Settings(null, false); assertEquals(false, settings.userHasAgreedToLicense()); settings = settings.withUserHasAgreedToLicense(true); assertEquals(true, settings.userHasAgreedToLicense()); }