@Test
public void parseProvisions() {

    List<Provisioner.ProvisionPlaintext> plaintexts = Arrays.asList(new Provisioner.ProvisionPlaintext(), new Provisioner.ProvisionPlaintext());
    plaintexts.get(0).setProvisionPath("/some/dir/abc.fdrp");
    plaintexts.get(0).setRepositoryProvision("{\"username\": \"user1\", \"password\": \"secret1\", \"name\": \"test repo a\", \"url\": \"https://example.com/fdroid/repo\", \"sigfp\": \"1111222233334444555566667777888899990000aaaabbbbccccddddeeeeffff\"}");
    plaintexts.get(1).setProvisionPath("/some/dir/def.fdrp");
    plaintexts.get(1).setRepositoryProvision("{\"username\": \"user2\", \"name\": \"test repo a\", \"password\": \"other secret\", \"url\": \"https://example.com/fdroid/repo\", \"sigfp\": \"1111222233334444555566667777888899990000aaaabbbbccccddddeeeeffff\"}");
    Provisioner p = new Provisioner();
    List<Provisioner.Provision> result = p.parseProvisions(plaintexts);
    Assert.assertEquals("/some/dir/abc.fdrp", result.get(0).getProvisonPath());
    Assert.assertEquals("test repo a", result.get(0).getRepositoryProvision().getName());
    Assert.assertEquals("https://example.com/fdroid/repo", result.get(0).getRepositoryProvision().getUrl());
    Assert.assertEquals("1111222233334444555566667777888899990000aaaabbbbccccddddeeeeffff", result.get(0).getRepositoryProvision().getSigfp());
    Assert.assertEquals("user1", result.get(0).getRepositoryProvision().getUsername());
    Assert.assertEquals("secret1", result.get(0).getRepositoryProvision().getPassword());
    Assert.assertEquals("/some/dir/def.fdrp", result.get(1).getProvisonPath());
    Assert.assertEquals("test repo a", result.get(1).getRepositoryProvision().getName());
    Assert.assertEquals("https://example.com/fdroid/repo", result.get(1).getRepositoryProvision().getUrl());
    Assert.assertEquals("1111222233334444555566667777888899990000aaaabbbbccccddddeeeeffff", result.get(1).getRepositoryProvision().getSigfp());
    Assert.assertEquals("user2", result.get(1).getRepositoryProvision().getUsername());
    Assert.assertEquals("other secret", result.get(1).getRepositoryProvision().getPassword());
}