// must have length 256 (see IDEDriveDescriptor)
int[] data = new int[256];
Boolean atapi = Boolean.valueOf(true);
final MockObjectTestCase mockTestCase = (MockObjectTestCase) testCase;
MockInitializer initializer = new MockInitializer() {
public void init(Mock mockDesc) {
BootLogInstance.get().debug("devSize=" + deviceSize);
Boolean bSupp48bitsAddr = Boolean.valueOf(supp48bitsAddr);
mockDesc.expects(mockTestCase.atLeastOnce()).
method("supports48bitAddressing").
withNoArguments().will(new ReturnStub(bSupp48bitsAddr));
long nbSectors = deviceSize / IDEConstants.SECTOR_SIZE;
Long lNbSectors = new Long(nbSectors);
String methodName = supp48bitsAddr ?
"getSectorsIn48bitAddressing" :
"getSectorsIn28bitAddressing";
mockDesc.expects(mockTestCase.atLeastOnce()).
method(methodName).
withNoArguments().will(new ReturnStub(lNbSectors));
}
};