@SuppressWarnings("serial")
public void testConfigCipherTransformersCipherNotFound() throws Exception {
// Setup
File localDir = new File("/some/folder");
ConfigTO configTO = new ConfigTO();
RepoTO repoTO = new RepoTO();
configTO.setMachineName("somevalidmachinename"); // <<< valid
repoTO.setChunkerTO(TestConfigUtil.createFixedChunkerTO()); // <<< valid
repoTO.setMultiChunker(TestConfigUtil.createZipMultiChunkerTO()); // <<< valid
repoTO.setRepoId(new byte[] { 0x01, 0x02 }); // <<< valid
configTO.setMasterKey(createDummyMasterKey()); // <<< valid
// Set invalid transformer
TransformerTO invalidTransformerTO = new TransformerTO();
invalidTransformerTO.setType("cipher");
invalidTransformerTO.setSettings(new HashMap<String, String>() {
{
put("cipherspecs", "1,INVALIDXXXX"); // <<<< INVALID !
}
});
ArrayList<TransformerTO> transformers = new ArrayList<TransformerTO>();
transformers.add(invalidTransformerTO);
repoTO.setTransformers(transformers);
// Run!
try {
new Config(localDir, configTO, repoTO);
fail("Transformer should NOT have been able to initialize.");