DummyArithmeticSInt implements SInt { @Override public String toString() { return "DummyArithmeticSInt [value=" + value + "]"; } DummyArithmeticSInt(FieldElement value); FieldElement getValue(); @Override String toString(); @Override SInt out();  }
@Test public void testToString() { BigIntegerFieldDefinition fd500 = new BigIntegerFieldDefinition( ModulusFinder.findSuitableModulus(8)); DummyArithmeticSInt value = new DummyArithmeticSInt(fd500.createElement(42)); String toString = value.toString(); Assert.assertThat(toString, StringContains.containsString("42")); Assert.assertThat(value.toString(), Is.is(toString)); }