@Test
public void deployTest() throws Exception {

    File jar = createJar();
    DistributionManagement distributionManagement = newDistributionManagement()
            .withRepository(newDeploymentRepository()
                    .withId("server")
                    .withUrl(localRepo.toURI().toURL().toString())).build();
    aether(localRepo, mavenSettings).deploy(distributionManagement, jar, "testGroupId", "testArtifactId", "testVersion");
    File artifactDirectory = directoryContains(localRepo, "testGroupId", "testArtifactId", "testVersion");
    assertThat(artifactDirectory, DirectoryMatcher.contains("testArtifactId-testVersion.jar", "testArtifactId-testVersion.pom"));
}