### Question:
Payload { public void setDoubleValue(@Nullable final Double doubleValue) { precheckStateAllNull(); this.doubleValue = doubleValue; } Payload(final String value);  Payload(final Double value);  Payload(final Long value);  Payload(final Map<String, Object> value);  Payload(final String[] values);  Payload(final Double[] values);  Payload(final Long[] values);  Payload();  Payload(@Nonnull final Payload other); @Nullable Double getDoubleValue(); void setDoubleValue(@Nullable final Double doubleValue); @Nullable Double[] getDoubleArray(); void setDoubleArray(@Nullable final Double[] doubleArray); @Nullable Long getLongValue(); void setLongValue(@Nullable final Long longValue); @Nullable Long[] getLongArray(); void setLongArray(@Nullable final Long[] longArray); @Nullable String getStringValue(); void setStringValue(@Nullable final String stringValue); @Nullable String[] getStringArray(); void setStringArray(@Nullable final String[] stringArray); @Nullable Map<String, Object> getMap(); void setMap(@Nullable final Map<String, Object> map); @Nonnull @Override String toString(); @Nonnull Optional<PayloadType> fetchPayloadType(); static boolean hasType(final Payload payload, final PayloadType payloadType); @Nonnull @Deprecated String fetchType(); boolean sameType(@Nullable final Payload other); int numFieldsDefined(); @CheckForNull Object fetchAValue(); @Override boolean equals(final Object o); @Override int hashCode(); static final Payload EMPTY_PAYLOAD; static final String PAYLOAD_OVERWRITE_EXCEPTION; }### Answer:
@Test public void testOverwritePayload(){ final Payload payload = new Payload("mapValue"); assertThatThrownBy(() -> payload.setDoubleValue(1.0)) .isInstanceOf(IllegalStateException.class) .hasMessageContaining(Payload.PAYLOAD_OVERWRITE_EXCEPTION); }