@Test void buildFromEmptyBundle_noKeys() { PrivateKeyEntityBuilder builder = new PrivateKeyEntityBuilder(keystoreHelper); final List<Entity> entities = builder.build(new Bundle(), BundleType.ENVIRONMENT, INSTANCE.getDocumentBuilder().newDocument()); assertTrue(entities.isEmpty()); }
@Override public List<Entity> build(Bundle bundle, BundleType bundleType, Document document) { Map<String, PrivateKey> privateKeyMap = Optional.ofNullable(bundle.getPrivateKeys()).orElse(Collections.emptyMap()); return buildEntities(bundle, bundleType, privateKeyMap, document); }
PrivateKeyEntityBuilder implements EntityBuilder { @Override public List<Entity> build(Bundle bundle, BundleType bundleType, Document document) { Map<String, PrivateKey> privateKeyMap = Optional.ofNullable(bundle.getPrivateKeys()).orElse(Collections.emptyMap()); return buildEntities(bundle, bundleType, privateKeyMap, document); } }
PrivateKeyEntityBuilder implements EntityBuilder { @Override public List<Entity> build(Bundle bundle, BundleType bundleType, Document document) { Map<String, PrivateKey> privateKeyMap = Optional.ofNullable(bundle.getPrivateKeys()).orElse(Collections.emptyMap()); return buildEntities(bundle, bundleType, privateKeyMap, document); } @Inject  PrivateKeyEntityBuilder(final KeystoreHelper keystoreHelper); }
PrivateKeyEntityBuilder implements EntityBuilder { @Override public List<Entity> build(Bundle bundle, BundleType bundleType, Document document) { Map<String, PrivateKey> privateKeyMap = Optional.ofNullable(bundle.getPrivateKeys()).orElse(Collections.emptyMap()); return buildEntities(bundle, bundleType, privateKeyMap, document); } @Inject  PrivateKeyEntityBuilder(final KeystoreHelper keystoreHelper); @Override List<Entity> build(Bundle bundle, BundleType bundleType, Document document); @Override @NotNull Integer getOrder(); }
PrivateKeyEntityBuilder implements EntityBuilder { @Override public List<Entity> build(Bundle bundle, BundleType bundleType, Document document) { Map<String, PrivateKey> privateKeyMap = Optional.ofNullable(bundle.getPrivateKeys()).orElse(Collections.emptyMap()); return buildEntities(bundle, bundleType, privateKeyMap, document); } @Inject  PrivateKeyEntityBuilder(final KeystoreHelper keystoreHelper); @Override List<Entity> build(Bundle bundle, BundleType bundleType, Document document); @Override @NotNull Integer getOrder();  }