SpdzSInt implements SInt, Serializable { @Override public String toString() { return "spdz(" + share + ", " + mac + ")"; } SpdzSInt(FieldElement share, FieldElement mac); FieldElement getShare(); FieldElement getMac(); SpdzSInt add(SpdzSInt e); SpdzSInt add(SpdzSInt e, int id); SpdzSInt subtract(SpdzSInt e); SpdzSInt multiply(FieldElement c); @Override String toString(); @Override SInt out(); byte[] serializeShare(ByteSerializer<FieldElement> serializer);  }
@Test public void string() { FieldElement share = get(BigInteger.ONE); FieldElement mac = get(BigInteger.ZERO); String result = new SpdzSInt(share, mac).toString(); assertThat(result, StringContains.containsString(share.toString())); assertThat(result, StringContains.containsString(mac.toString())); }