### Question:
AbstractMessageService implements MessageService { protected final void addMessageTemplates(MessageTemplates messageTemplates) { validateMessageTemplates(messageTemplates); messageTemplateStorage.addMessageTemplates(messageTemplates); } AbstractMessageService(String messagesFilePath); @Override Message createMessage(String key, Object... parameters); @Override List<Message> createMessage(String key, List<Object[]> parameters);  }### Answer:
@Test public void shouldThrowException_IfThereAreDuplicatedMessageNumbers() { MessageTemplate message = new MessageTemplate(); message.setKey("org.zowe.apiml.common.serviceTimeout"); message.setNumber("ZWEAM700"); MessageTemplate message2 = new MessageTemplate(); message2.setKey("org.zowe.apiml.common.serviceTimeout.illegalFormat"); message2.setNumber("ZWEAM700"); MessageTemplates messages = new MessageTemplates(); messages.setMessages( Arrays.asList(message, message2) ); exception.expect(DuplicateMessageException.class); exception.expectMessage("Message template with number [ZWEAM700] already exists"); abstractMessageService.addMessageTemplates(messages); }