@@ -0,0 +1,1510 @@
+package com.example.jms.entry.jms;%0A%0Aimport com.example.jms.entry.model.Article;%0Aimport com.fasterxml.jackson.core.JsonProcessingException;%0Aimport com.fasterxml.jackson.databind.ObjectMapper;%0Aimport org.junit.Assert;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0Aimport org.mockito.Mock;%0Aimport org.mockito.Mockito;%0Aimport org.springframework.beans.factory.annotation.Autowired;%0Aimport org.springframework.boot.test.context.SpringBootTest;%0Aimport org.springframework.boot.test.mock.mockito.MockBean;%0Aimport org.springframework.jms.core.JmsTemplate;%0Aimport org.springframework.test.context.junit4.SpringRunner;%0A%0A@RunWith(SpringRunner.class)%0A@SpringBootTest%0Apublic class ArticleSenderTests %7B%0A%0A    @MockBean%0A    private JmsTemplate mockJmsTemplate;%0A%0A    @MockBean%0A    private ObjectMapper mockObjectMapper;%0A%0A    @Autowired%0A    private ArticleSender articleSender;%0A%0A    @Test%0A    public void articleSenderLoads() %7B%0A        // Arrange%0A        // Act%0A        // Assert%0A        Assert.assertNotNull(articleSender);%0A    %7D%0A%0A    @Test%0A    public void sendArticleForAdd_convertsArticle() throws JsonProcessingException %7B%0A        // Arrange%0A        Article article = new Article();%0A        String articleJson = %22%7B%5C%22articleId%5C%22: 1%7D%22;%0A        Mockito.when(mockObjectMapper.writeValueAsString(article)).thenReturn(articleJson);%0A%0A        // Act%0A        articleSender.sendArticleForAdd(article);%0A%0A        // Assert%0A        Mockito.verify(mockObjectMapper).writeValueAsString(article);%0A    %7D%0A%7D%0A

Add a unit test