String parentName = "pooh";
String parentNumber = "5";
List<Module> modules = Lists.newArrayList();
Properties properties = new Properties();
Build build = new BuildInfoBuilder(name).started("test").version(version).number(number).type(buildType)
.agent(agent).durationMillis(durationMillis).principal(principal)
.artifactoryPrincipal(artifactoryPrincipal).url(url).parentName(parentName).parentNumber(parentNumber)
.modules(modules).properties(properties).buildAgent(buildAgent).build();
assertEquals(build.getVersion(), version, "Unexpected build version.");
assertEquals(build.getName(), name, "Unexpected build name.");
assertEquals(build.getNumber(), number, "Unexpected build number.");
assertEquals(build.getType(), buildType, "Unexpected build type.");
assertEquals(build.getAgent(), agent, "Unexpected build agent.");
assertEquals(build.getBuildAgent(), buildAgent, "Unexpected build agent.");
assertEquals(build.getDurationMillis(), durationMillis, "Unexpected build duration millis.");
assertEquals(build.getPrincipal(), principal, "Unexpected build principal.");
assertEquals(build.getArtifactoryPrincipal(), artifactoryPrincipal, "Unexpected build artifactory principal.");
assertEquals(build.getUrl(), url, "Unexpected build URL.");
assertEquals(build.getParentName(), parentName, "Unexpected build parent name.");
assertEquals(build.getParentNumber(), parentNumber, "Unexpected build parent build number.");
assertEquals(build.getModules(), modules, "Unexpected build modules.");
assertTrue(build.getModules().isEmpty(), "Build modules list should not have been populated.");
assertEquals(build.getProperties(), properties, "Unexpected build properties.");
assertTrue(build.getProperties().isEmpty(), "Build properties list should not have been populated.");
}