### Question:
MessageConverter { static BuildMessage convertMessage(final Message message, Handles handles) { final BuildMessage m = new BuildMessage(); switch (message.getLevel()) { case ERROR: m.setLevel(Level.ERROR); break; case WARNING: m.setLevel(Level.WARNING); break; case INFO: m.setLevel(Level.INFO); break; } m.setId(message.getId()); m.setLine(message.getLine()); m.setPath(convertPath(message.getPath(), handles)); m.setColumn(message.getColumn()); m.setText(convertMessageText(message)); return m; }    }### Answer:
@Test public void checkMessageWithKieBase() { final MessageImpl m = new MessageImpl(ID, Message.Level.ERROR, FILE, TEXT); m.setKieBaseName(KIE_BASE_NAME); final BuildMessage bm = MessageConverter.convertMessage(m, handles); assertConversion(bm, () -> "[KBase: " + KIE_BASE_NAME + "]: " + TEXT); }
@Test public void checkMessageWithoutKieBase() { final Message m = new MessageImpl(ID, Message.Level.ERROR, FILE, TEXT); final BuildMessage bm = MessageConverter.convertMessage(m, handles); assertConversion(bm, () -> TEXT); }