ContractsMavenDependencyLoader implements ContractsRetriever { protected void unpack(File destination, List<JavaArchive> contracts) throws IOException { for (JavaArchive contract : contracts) { unpack(destination, contract); } } ContractsMavenDependencyLoader();  ContractsMavenDependencyLoader(ContractsMavenDependency contractsMavenDependency); @Override List<URI> retrieve(); @Override void configure(Map<String, Object> configuration); @Override String getName();  }
@Test public void should_unpack_pacts() throws IOException { final JavaArchive contract = ShrinkWrap.create(JavaArchive.class, "contract.jar") .add(new StringAsset("My contract"), "/contract.json"); ContractsMavenDependencyLoader contractsMavenDependencyLoader = new ContractsMavenDependencyLoader(MavenLoaderTest.class.getAnnotation(ContractsMavenDependency.class)); contractsMavenDependencyLoader.unpack(folder.getRoot(), Arrays.asList(contract)); final File contractFile = new File(folder.getRoot(), "contract.json"); assertThat(contractFile).exists(); assertThat(contractFile).hasContent("My contract"); }