.mockGetApplications("foobarz", GET_DOMAINS_FOOBARZ_APPLICATIONS_NOAPPS)
.mockCreateApplication("foobarz", POST_JEKYLL_DOMAINS_FOOBARZ_APPLICATIONS);
// operation
final IApplication app = domain.createApplication("jekyll", CartridgeTestUtils.jenkins14());
// verifications
Messages messages = app.getMessages();
assertThat(messages).isNotNull();
assertThat(messages.getAll()).hasSize(3);
List<Message> defaultMessages = messages.getBy(IField.DEFAULT);
assertThat(defaultMessages).hasSize(3);
List<Message> infoSeverityMessages = messages.getBy(IField.DEFAULT, ISeverity.INFO);
assertThat(infoSeverityMessages).hasSize(1);
new MessageAssert(infoSeverityMessages.get(0))
.hasExitCode(0)
.hasText("Application jekyll was created.");
List<Message> debugSeverityMessages = app.getMessages().getBy(IField.DEFAULT, ISeverity.DEBUG);
assertThat(debugSeverityMessages).hasSize(1);
new MessageAssert(debugSeverityMessages.get(0))
.hasExitCode(0)
.hasText("The cartridge jenkins deployed a template application");
List<Message> resultSeverityMessages = messages.getBy(IField.DEFAULT, ISeverity.RESULT);
assertThat(resultSeverityMessages).hasSize(1);
new MessageAssert(resultSeverityMessages.get(0))
.hasExitCode(0)
.hasText("Jenkins created successfully. "
+ "Please make note of these credentials:\n User: admin\n Password: wLwSzJPh6dqN\n"