### Question:
SimpleMessage implements Message { @Override public Map<Headers, String> getHeaders() { return Collections.unmodifiableMap(headers); }  @Override void addHeader(Headers header, String value); @Override String getHeader(Headers header); @Override Map<Headers, String> getHeaders(); @Override void setBody(String body); @Override String getBody();  }### Answer:
@Test public void testUnModifiableHeaders() { final SimpleMessage message = new SimpleMessage(); final Map<Message.Headers, String> headers = message.getHeaders(); assertThrows(UnsupportedOperationException.class, () -> { headers.put(Message.Headers.SENDER, "test"); }); }
@Test public void testGetHeaders() { final var message = new SimpleMessage(); assertNotNull(message.getHeaders()); assertTrue(message.getHeaders().isEmpty()); final var senderName = "test"; message.addHeader(Message.Headers.SENDER, senderName); assertNotNull(message.getHeaders()); assertFalse(message.getHeaders().isEmpty()); assertEquals(senderName, message.getHeaders().get(Message.Headers.SENDER)); }
@Test public void testUnModifiableHeaders() { final var message = new SimpleMessage(); final var headers = message.getHeaders(); assertThrows(UnsupportedOperationException.class, () -> { headers.put(Message.Headers.SENDER, "test"); }); }