use of com.navercorp.pinpoint.web.applicationmap.ServerBuilder in project pinpoint by naver.
the class ServerInstanceListSerializerTest method testSerialize.
@Test
public void testSerialize() throws Exception {
ObjectMapper mapper = createMapper();
AgentInfo agentInfo = ServerInstanceListTest.createAgentInfo("agentId1", "testHost");
Set<AgentInfo> agentInfoSet = new HashSet<>();
agentInfoSet.add(agentInfo);
ServerBuilder builder = new ServerBuilder();
builder.addAgentInfo(agentInfoSet);
ServerInstanceList serverInstanceList = builder.build();
ObjectWriter objectWriter = mapper.writerWithDefaultPrettyPrinter();
String json = objectWriter.writeValueAsString(serverInstanceList);
logger.debug(json);
}
Aggregations