}
public IBMPartitionTable createIBMPartitionTable(byte[] bs, Device dev) {
MockInitializer initializer = new MockInitializer() {
public void init(Mock mockTable) {
final BlockDeviceAPIContext context = (BlockDeviceAPIContext) ContextManager
.getInstance().getContext();
final Partition[] parts = context.getPartitions();
log.debug("with " + parts.length + " partitions");
Integer nbParts = new Integer(parts.length);
mockTable.expects(testCase.atLeastOnce()).method("getLength")
.withNoArguments().will(new ReturnStub(nbParts));