@Test public void testAlgorithmNotPresent() { Properties properties = new Properties(); properties .put(EncryptionConfigParser.WRITER_ENCRYPT_PREFIX + "." + EncryptionConfigParser.ENCRYPTION_KEYSTORE_PATH_KEY, "/tmp/foobar"); properties.put( EncryptionConfigParser.WRITER_ENCRYPT_PREFIX + "." + EncryptionConfigParser.ENCRYPTION_KEYSTORE_PASSWORD_KEY, "abracadabra"); State s = new State(properties); Map<String, Object> parsedProperties = EncryptionConfigParser.getConfigForBranch(EncryptionConfigParser.EntityType.WRITER, s, 1, 0); Assert.assertNull(parsedProperties, "Expected encryption be empty if no algorithm specified"); }
public static Map<String, Object> getConfigForBranch(EntityType entityType, WorkUnitState workUnitState) { return getConfigForBranch(entityType, null, workUnitState); }
EncryptionConfigParser { public static Map<String, Object> getConfigForBranch(EntityType entityType, WorkUnitState workUnitState) { return getConfigForBranch(entityType, null, workUnitState); } }
EncryptionConfigParser { public static Map<String, Object> getConfigForBranch(EntityType entityType, WorkUnitState workUnitState) { return getConfigForBranch(entityType, null, workUnitState); }  }
EncryptionConfigParser { public static Map<String, Object> getConfigForBranch(EntityType entityType, WorkUnitState workUnitState) { return getConfigForBranch(entityType, null, workUnitState); }  static Map<String, Object> getConfigForBranch(EntityType entityType, WorkUnitState workUnitState); static Map<String, Object> getConfigForBranch(EntityType entityType, String entityName, WorkUnitState workUnitState); static Map<String, Object> getConfigForBranch(EntityType entityType, State taskState, int numBranches, int branch); static String getEncryptionType(Map<String, Object> properties); static String getKeystorePath(Map<String, Object> properties); static String getKeystorePassword(Map<String, Object> properties); static String getKeystoreType(Map<String, Object> parameters); static String getKeyName(Map<String, Object> parameters); static String getKeystoreEncoding(Map<String, Object> parameters); static String getCipher(Map<String, Object> parameters); }
EncryptionConfigParser { public static Map<String, Object> getConfigForBranch(EntityType entityType, WorkUnitState workUnitState) { return getConfigForBranch(entityType, null, workUnitState); }  static Map<String, Object> getConfigForBranch(EntityType entityType, WorkUnitState workUnitState); static Map<String, Object> getConfigForBranch(EntityType entityType, String entityName, WorkUnitState workUnitState); static Map<String, Object> getConfigForBranch(EntityType entityType, State taskState, int numBranches, int branch); static String getEncryptionType(Map<String, Object> properties); static String getKeystorePath(Map<String, Object> properties); static String getKeystorePassword(Map<String, Object> properties); static String getKeystoreType(Map<String, Object> parameters); static String getKeyName(Map<String, Object> parameters); static String getKeystoreEncoding(Map<String, Object> parameters); static String getCipher(Map<String, Object> parameters); static final String ENCRYPTION_ALGORITHM_KEY; static final String ENCRYPTION_KEYSTORE_PATH_KEY; static final String ENCRYPTION_KEYSTORE_PASSWORD_KEY; static final String ENCRYPTION_KEY_NAME; static final String ENCRYPTION_KEYSTORE_TYPE_KEY; static final String ENCRYPTION_KEYSTORE_TYPE_KEY_DEFAULT; static final String ENCRYPTION_KEYSTORE_ENCODING_KEY; static final String ENCRYPTION_KEYSTORE_ENCODING_DEFAULT; static final String ENCRYPTION_TYPE_ANY; static final String ENCRYPTION_CIPHER_KEY; }