//package org.bench4q.web.test.masterMessager;
//
//import static com.github.tomakehurst.wiremock.client.WireMock.*;
//
//import static org.junit.Assert.*;
//
//import org.bench4q.share.helper.MarshalHelper;
//import org.bench4q.share.models.master.MonitorMemoryResponseModel;
//import org.bench4q.share.models.master.MonitorProcessorResponseModel;
//import org.bench4q.web.masterMessager.MonitorMessager;
//
//import org.junit.AfterClass;
//import org.junit.BeforeClass;
//import org.junit.Test;
//import org.junit.runner.RunWith;
//
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.test.context.ContextConfiguration;
//import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
//
//@RunWith(SpringJUnit4ClassRunner.class)
//@ContextConfiguration("file:src/test/resources/bench4qweb-servlet.xml")
//public class MonitorMessageTest extends MessagerTestBase {
//	private MonitorMessager monitorMessager;
//	private String baseUrl = "/monitorController";
//
//	public MonitorMessager getMonitorMessager() {
//		return monitorMessager;
//	}
//
//	@Autowired
//	public void setMonitorMessager(MonitorMessager monitorMessager) {
//		this.monitorMessager = monitorMessager;
//	}
//
//	@BeforeClass
//	public static void setUp() {
//		startServer();
//	}
//
//	@AfterClass
//	public static void clear() {
//		stopServer();
//	}
//
//	@Test
//	public void test_memory() {
//		String url = baseUrl + "/memorySUTInfo";
//		MonitorMemoryResponseModel monitorMemoryResponseModel = new MonitorMemoryResponseModel();
//		String response = MarshalHelper.tryMarshal(monitorMemoryResponseModel);
//		this.getWireMock().register(
//				post(urlEqualTo(url))
//						.withRequestBody(containing("testPlanId"))
//						.withRequestBody(containing("hostName"))
//						.withRequestBody(containing("port"))
//						.withRequestBody(containing("duationBegin"))
//						.willReturn(
//								aResponse().withStatus(200)
//										.withHeader("Content-Type", "text/xml")
//										.withBody(response)));
//		assertNotNull(this.monitorMessager.memory(null, "", "", "", ""));
//	}
//
//	@Test
//	public void test_porcessor() {
//		String url = baseUrl + "/processorSUTInfo";
//		MonitorProcessorResponseModel monitorProcessorResponseModel = new MonitorProcessorResponseModel();
//		String response = MarshalHelper
//				.tryMarshal(monitorProcessorResponseModel);
//		this.getWireMock().register(
//				post(urlEqualTo(url))
//						.withRequestBody(containing("testPlanId"))
//						.withRequestBody(containing("hostName"))
//						.withRequestBody(containing("port"))
//						.withRequestBody(containing("duationBegin"))
//						.willReturn(
//								aResponse().withStatus(200)
//										.withHeader("Content-Type", "text/xml")
//										.withBody(response)));
//		assertNotNull(this.monitorMessager.porcessor(null, "", "", "", ""));
//	}
//
//}
