package cz.moneta.test.system.messaging;

import cz.moneta.test.dsl.Harness;
import cz.moneta.test.harness.annotations.TestCase;
import cz.moneta.test.harness.annotations.TestScenario;

@TestScenario(name = "Send MQ message")
public class SendMQMessage {
	
	@TestCase(name = "Send MQ message")
	public void sendMessage(Harness harness) {
		String message = "Hello, this is a test message!";
		 String destination = "mainframe-utf8-queue";
		 
		 System.setProperty("javax.net.ssl.trustStore", "/home/kamma/tmp/mq-docker/ibmmq-client.p12");
		 System.setProperty("javax.net.ssl.trustStorePassword", "changeit");
		 
         //System.setProperty("jdk.tls.client.protocols", "TLSv1.2");
         //System.setProperty("javax.net.ssl.trustStoreType", "PKCS12");

		 harness.withMessaging().to(destination).asJson().withPayload(message).send();
	 }

}
