AuthenticatedElement implements Addable<AuthenticatedElement> { @Override public String toString() { return "AuthenticatedElement [" + "share=" + share + ", mac=" + mac + ']'; } AuthenticatedElement(FieldElement share, FieldElement mac); @Override AuthenticatedElement add(AuthenticatedElement other); AuthenticatedElement add(
      FieldDefinition fieldDefinition,
      FieldElement other, int partyId, FieldElement macKeyShare); AuthenticatedElement subtract(AuthenticatedElement other); AuthenticatedElement multiply(FieldElement constant); FieldElement getMac(); FieldElement getShare(); @Override String toString();  }
@Test public void testToString() { AuthenticatedElement element = new AuthenticatedElement( definition.createElement(1), definition.createElement(2) ); String expected = "AuthenticatedElement [share=BigIntegerFieldElement{value=1, modulus=BigIntegerModulus{value=251}}, mac=BigIntegerFieldElement{value=2, modulus=BigIntegerModulus{value=251}}]"; assertEquals(expected, element.toString()); }