public void testAddBuildDependencyMethod() {
Build build = new Build();
assertNull(build.getBuildDependencies(), "Default buildDependencies list should be null.");
BuildDependency buildDependency = new BuildDependencyBuilder().name("foo").number("123").startedDate(new Date()).build();
build.addBuildDependency(buildDependency);
assertFalse(build.getBuildDependencies().isEmpty(), "BuildDependency object should have been added.");
assertEquals(getOnlyElement(build.getBuildDependencies()), buildDependency, "Unexpected build dependency object.");
BuildDependency otherBuildDependency = new BuildDependencyBuilder().name("bar").number("456").startedDate(new Date()).build();
build.addBuildDependency(otherBuildDependency);
assertEquals(build.getBuildDependencies().size(), 2, "Second BuildDependency object should have been added.");
assertEquals(getLast(build.getBuildDependencies()), otherBuildDependency, "Unexpected build dependency object.");
}