@Test(expected = IllegalStateException.class) public void testInvalidBuild() { builder.build(); }
@Override public KeyCryptoProduct build() { for (final Attribute a : Attribute.values()) { if (!isSet(a)) { throw new IllegalStateException("Unset attribute: " + a.toString()); } } return new KeyCryptoProductImpl(username, keySalt, privateKey, serverAddress); }
SimpleKeyCryptoBuilder extends KeyCryptoBuilder { @Override public KeyCryptoProduct build() { for (final Attribute a : Attribute.values()) { if (!isSet(a)) { throw new IllegalStateException("Unset attribute: " + a.toString()); } } return new KeyCryptoProductImpl(username, keySalt, privateKey, serverAddress); } }
SimpleKeyCryptoBuilder extends KeyCryptoBuilder { @Override public KeyCryptoProduct build() { for (final Attribute a : Attribute.values()) { if (!isSet(a)) { throw new IllegalStateException("Unset attribute: " + a.toString()); } } return new KeyCryptoProductImpl(username, keySalt, privateKey, serverAddress); }  }
SimpleKeyCryptoBuilder extends KeyCryptoBuilder { @Override public KeyCryptoProduct build() { for (final Attribute a : Attribute.values()) { if (!isSet(a)) { throw new IllegalStateException("Unset attribute: " + a.toString()); } } return new KeyCryptoProductImpl(username, keySalt, privateKey, serverAddress); }  @Override KeyCryptoProduct build(); @Override KeyCryptoBuilder setKeySalt(final String keySalt); @Override KeyCryptoBuilder setPrivateKey(final URI privateKey); @Override KeyCryptoBuilder setServerAddress(final URI serverAddress); @Override KeyCryptoBuilder setUsername(final String username); }
SimpleKeyCryptoBuilder extends KeyCryptoBuilder { @Override public KeyCryptoProduct build() { for (final Attribute a : Attribute.values()) { if (!isSet(a)) { throw new IllegalStateException("Unset attribute: " + a.toString()); } } return new KeyCryptoProductImpl(username, keySalt, privateKey, serverAddress); }  @Override KeyCryptoProduct build(); @Override KeyCryptoBuilder setKeySalt(final String keySalt); @Override KeyCryptoBuilder setPrivateKey(final URI privateKey); @Override KeyCryptoBuilder setServerAddress(final URI serverAddress); @Override KeyCryptoBuilder setUsername(final String username);  }