Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
@DisplayName("Spring boot 2 mockito2 Junit5 example")
public class ShowServiceTests {
private static final String MOCK_OUTPUT = "Mocked show label";
private TextService textService;
private ShowService showService;
void setMockOutput() {
@DisplayName("Mock the output of the text service using mockito")
public void contextLoads() {
assertEquals(showService.getShowLable(), MOCK_OUTPUT);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment