### Question:
TimedMessage implements Updatable, Renderable { @Override public void update(double extrp) { for (final MessageData messageData : messages) { if (messageData.elapsed()) { delete.add(messageData); deleted = true; } } if (deleted) { for (final MessageData messageData : delete) { messages.remove(messageData); } hasMessage = !messages.isEmpty(); deleted = false; } } TimedMessage(Text text); void addMessage(String message, int x, int y, long time); boolean hasMessage(); @Override void update(double extrp); @Override void render(Graphic g);  }### Answer:
@Test void testUpdate() { final TimedMessage message = new TimedMessage(Graphics.createText(Constant.FONT_DIALOG, 8, TextStyle.NORMAL)); message.update(1.0); assertFalse(message.hasMessage()); message.addMessage("test", 0, 0, 0L); message.addMessage("test2", 0, 0, 100L); assertTrue(message.hasMessage()); message.update(1.0); assertTrue(message.hasMessage()); UtilTests.pause(25L); message.update(1.0); assertTrue(message.hasMessage()); UtilTests.pause(100L); message.update(1.0); assertFalse(message.hasMessage()); }