ExtensionField implements Field { public static Builder builder() { return new Builder(); } private  ExtensionField(String fieldName, String rawValue); static Builder builder(); @Override String formattedValue(); @Override final boolean equals(Object o); @Override final int hashCode(); @Override String toString();  }
@Test void shouldThrowOnNullFieldName() { assertThatThrownBy(() -> ExtensionField.builder() .fieldName(null) .rawValue("rawValue") .build()) .isInstanceOf(NullPointerException.class); }
@Test void shouldThrowOnNullRawValue() { assertThatThrownBy(() -> ExtensionField.builder() .fieldName("name") .rawValue(null) .build()) .isInstanceOf(NullPointerException.class); }
@Test void shouldThrowOnMultilineName() { assertThatThrownBy(() -> ExtensionField.builder() .fieldName("name\nmultiline") .rawValue("rawValue") .build()) .isInstanceOf(IllegalStateException.class); }