MersennePrimeModulus implements Serializable { @Override public String toString() { return "MersennePrimeModulus{" + "value=" + prime + '}'; } MersennePrimeModulus(int bitLength, int constant); @Override String toString();  }
@Test public void toStringTest() { MersennePrimeModulus prime = new MersennePrimeModulus(160, 47); assertThat( prime.toString(), CoreMatchers.containsString("1461501637330902918203684832716283019655932542929")); }