MascotResourcePoolImpl extends ResourcePoolImpl implements MascotResourcePool { @Override public RotBatch createRot(int otherId, Network network) { if (getMyId() == otherId) { throw new IllegalArgumentException("Cannot initialize with self"); } CoinTossing ct = new CoinTossing(getMyId(), otherId, getRandomGenerator()); ct.initialize(network); OtExtensionResourcePool otResources = new OtExtensionResourcePoolImpl(getMyId(), otherId, getPrgSeedLength(), getLambdaSecurityParam(), getInstanceId(), getRandomGenerator(), ct, seedOts.get(otherId)); return new BristolRotBatch(new RotFactory(otResources, network), getPrgSeedLength(), getLambdaSecurityParam()); } MascotResourcePoolImpl(int myId, int noOfParties, int instanceId, Drbg drbg,
      Map<Integer, RotList> seedOts, MascotSecurityParameters mascotSecurityParameters,
      FieldDefinition fieldDefinition); @Override FieldDefinition getFieldDefinition(); @Override int getInstanceId(); @Override int getModBitLength(); @Override int getLambdaSecurityParam(); @Override int getNumCandidatesPerTriple(); @Override FieldElementPrg getLocalSampler(); @Override RotBatch createRot(int otherId, Network network); @Override Drbg getRandomGenerator(); @Override MessageDigest getMessageDigest(); @Override int getPrgSeedLength();  }
@Test(expected = IllegalArgumentException.class) public void testCreateRotForSelf() { MascotResourcePool resourcePool = new MascotResourcePoolImpl(1, 1, 1, new AesCtrDrbg(new byte[32]), null, new MascotSecurityParameters(), new BigIntegerFieldDefinition(ModulusFinder.findSuitableModulus(128))); resourcePool.createRot(1, null); }