DevicePattern implements Identifiable, OrderedPattern<DevicePattern>, Serializable { @Override public String toString() { final StringBuilder builder = new StringBuilder(); builder.append("DevicePattern [id="); builder.append(id); builder.append(", pattern="); builder.append(pattern); builder.append(", position="); builder.append(position); builder.append("]"); return builder.toString(); } DevicePattern(@Nonnegative final int id, @Nonnull final Pattern pattern, @Nonnegative final int position); @Override int compareTo(final DevicePattern other); @Override boolean equals(final Object obj); @Override int getId(); @Override Pattern getPattern(); @Override int getPosition(); @Override int hashCode(); @Override String toString();  }
@Test public void testToString() { assertThat(new Blueprint().build().toString()).isEqualTo("DevicePattern [id=123456789, pattern=[a-z]+, position=987654321]"); }