ArithmeticDummyDataSupplier { public Pair<BigInteger, BigInteger> getRandomBitShare() { BigInteger bit = getNextBit(); return new Pair<>(bit, sharer.share(bit, noOfParties).get(myId - 1)); } ArithmeticDummyDataSupplier(int myId, int noOfParties, BigInteger modulus); Pair<BigInteger, BigInteger> getRandomElementShare(); Pair<BigInteger, BigInteger> getRandomBitShare(); MultiplicationTripleShares getMultiplicationTripleShares(); List<Pair<BigInteger, BigInteger>> getExpPipe(int expPipeLength);  }
@Test public void testBitsNotAllSame() { int noOfParties = 2; BigInteger modulus = moduli.get(1); ArithmeticDummyDataSupplier supplier = new ArithmeticDummyDataSupplier(1, noOfParties, modulus); List<BigInteger> bits = new ArrayList<>(1000); for (int i = 0; i < 1000; i++) { bits.add(supplier.getRandomBitShare().getFirst()); } boolean seenZero = false; boolean seenOne = false; for (BigInteger bit : bits) { seenZero = seenZero || bit.equals(BigInteger.ZERO); seenOne = seenOne || bit.equals(BigInteger.ONE); if (seenOne && seenZero) { break; } } assertTrue(seenOne); assertTrue(seenZero); }