private Mock <VDI> GetMockVdi(int vbdsToAdd) { MockVdiWithVbds vdiBuilder = ObjectFactory.Builder(ObjectBuilderType.VdiWithVbds, id) as MockVdiWithVbds; if (vdiBuilder == null) { throw new ApplicationException("Builder was null"); } vdiBuilder.NumberOfVbdsToAdd = vbdsToAdd; return(vdiBuilder.BuildObject() as Mock <VDI>); }