@Test
public void testCreatePuppetScript() throws Exception {

    Repository repository = Repository.builder()
        .name("bigtop")
        .addEntry("deb http://bigtop.s3.amazonaws.com/releases/0.5.0/ubuntu/lucid/x86_64  bigtop contrib")
        .key("-----BEGIN PGP PUBLIC KEY BLOCK-----\n" +
            "Version: GnuPG v1.4.10 (GNU/Linux)\n" +
            "\n" +
            "[....]")
        .createRepository();
    Pool pool = mock(Pool.class);
    when(pool.getSoftware()).thenReturn(Software.builder().repository(repository).createSoftware());
    PuppetActivity activity = new InstallRepositories();
    String content = activity.createPuppetScript(pool, null);
    assertThat(content).contains("apt::repository { \"bigtop\":\n" +
        "  content => \"deb http://bigtop.s3.amazonaws.com/releases/0.5.0/ubuntu/lucid/x86_64  bigtop contrib\\n\",\n" +
        "  key => \"-----BEGIN PGP PUBLIC KEY BLOCK-----\\nVersion: GnuPG v1.4.10 (GNU/Linux)\\n\\n[....]\"\n" +
        "}");
}