org.springframework.http.MediaType.APPLICATION_JSON_UTF8_VALUE - java examples

Here are the examples of the java api org.springframework.http.MediaType.APPLICATION_JSON_UTF8_VALUE taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

155 Examples 7

18 View Complete Implementation : LevelSkillResourceIntTest.java
Copyright Apache License 2.0
Author : otto-de
/**
 * Executes the search, and checks that the default enreplacedy is not returned
 */
private void defaultLevelSkillShouldNotBeFound(String filter) throws Exception {
    restLevelSkillMockMvc.perform(get("/api/level-skills?sort=id,desc&" + filter)).andExpect(status().isOk()).andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)).andExpect(jsonPath("$").isArray()).andExpect(jsonPath("$").isEmpty());
}

18 View Complete Implementation : TeamSkillResourceIntTest.java
Copyright Apache License 2.0
Author : otto-de
/**
 * Executes the search, and checks that the default enreplacedy is not returned
 */
private void defaultTeamSkillShouldNotBeFound(String filter) throws Exception {
    restTeamSkillMockMvc.perform(get("/api/team-skills?sort=id,desc&" + filter)).andExpect(status().isOk()).andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)).andExpect(jsonPath("$").isArray()).andExpect(jsonPath("$").isEmpty());
}

18 View Complete Implementation : RestSecurityIntegrationTest.java
Copyright Apache License 2.0
Author : apache
@Test
public void testQueries() throws Exception {
    restClient.doGetAndreplacedert("/queries", "user", "wrongPswd").hreplacedtatusCode(401);
    restClient.doGetAndreplacedert("/queries", "user", "user").hreplacedtatusCode(403);
    restClient.doGetAndreplacedert("/queries", "dataRead", "dataRead").hreplacedtatusCode(200).hasContentType(MediaType.APPLICATION_JSON_UTF8_VALUE);
}

18 View Complete Implementation : PulseControllerJUnitTest.java
Copyright Apache License 2.0
Author : apache
@Test
public void pulseUpdateForClusterRegion() throws Exception {
    this.mockMvc.perform(post("/pulseUpdate").param("pulseData", "{\"ClusterRegion\":\"{}\"}").principal(principal).accept(MediaType.parseMediaType(MediaType.APPLICATION_JSON_UTF8_VALUE))).andExpect(status().isOk()).andExpect(jsonPath("$.ClusterRegion.clusterName").value(CLUSTER_NAME)).andExpect(jsonPath("$.ClusterRegion.userName").value(PRINCIPAL_USER)).andExpect(jsonPath("$.ClusterRegion.region[0].regionPath").value(REGION_PATH)).andExpect(jsonPath("$.ClusterRegion.region[0].diskReadsTrend").isEmpty()).andExpect(jsonPath("$.ClusterRegion.region[0].memoryUsage").value("0.0000")).andExpect(jsonPath("$.ClusterRegion.region[0].getsRate").value(27.99D)).andExpect(jsonPath("$.ClusterRegion.region[0].wanEnabled").value(false)).andExpect(jsonPath("$.ClusterRegion.region[0].memberCount").value(1)).andExpect(jsonPath("$.ClusterRegion.region[0].memberNames[0].name").value(MEMBER_NAME)).andExpect(jsonPath("$.ClusterRegion.region[0].memberNames[0].id").value(MEMBER_ID)).andExpect(jsonPath("$.ClusterRegion.region[0].emptyNodes").value(0)).andExpect(jsonPath("$.ClusterRegion.region[0].type").value(REGION_TYPE)).andExpect(jsonPath("$.ClusterRegion.region[0].isEnableOffHeapMemory").value("OFF")).andExpect(jsonPath("$.ClusterRegion.region[0].putsRate").value(12.31D)).andExpect(jsonPath("$.ClusterRegion.region[0].totalMemory").value(0)).andExpect(jsonPath("$.ClusterRegion.region[0].entryCount").value(0)).andExpect(jsonPath("$.ClusterRegion.region[0].compressionCodec").value("NA")).andExpect(jsonPath("$.ClusterRegion.region[0].name").value(REGION_NAME)).andExpect(jsonPath("$.ClusterRegion.region[0].systemRegionEntryCount").value(0)).andExpect(jsonPath("$.ClusterRegion.region[0].persistence").value("OFF")).andExpect(jsonPath("$.ClusterRegion.region[0].memoryReadsTrend").isEmpty()).andExpect(jsonPath("$.ClusterRegion.region[0].diskWritesTrend").isEmpty()).andExpect(jsonPath("$.ClusterRegion.region[0].memoryWritesTrend").isEmpty()).andExpect(jsonPath("$.ClusterRegion.region[0].dataUsage").value(0)).andExpect(jsonPath("$.ClusterRegion.region[0].entrySize").value("0.0000"));
}

18 View Complete Implementation : PulseControllerJUnitTest.java
Copyright Apache License 2.0
Author : apache
@Test
public void dataBrowserRegions() throws Exception {
    this.mockMvc.perform(get("/dataBrowserRegions").accept(MediaType.parseMediaType(MediaType.APPLICATION_JSON_UTF8_VALUE))).andExpect(status().isOk()).andExpect(jsonPath("$.clusterName").value(CLUSTER_NAME)).andExpect(jsonPath("$.connectedFlag").value(false)).andExpect(jsonPath("$.clusterRegions[0].fullPath").value(REGION_PATH)).andExpect(jsonPath("$.clusterRegions[0].regionType").value(REGION_TYPE));
}

18 View Complete Implementation : PulseControllerJUnitTest.java
Copyright Apache License 2.0
Author : apache
@Test
public void getQueryStatisticsGridModel() throws Exception {
    this.mockMvc.perform(get("/getQueryStatisticsGridModel").principal(principal).accept(MediaType.parseMediaType(MediaType.APPLICATION_JSON_UTF8_VALUE))).andExpect(status().isOk()).andExpect(jsonPath("$.columnNames", containsInAnyOrder("Query", "NumExecution", "TotalExecutionTime(ns)", "NumExecutionsInProgress", "NumTimesCompiled", "NumTimesGlobalIndexLookup", "NumRowsModified", "ParseTime(ms)", "BindTime(ms)", "OptimizeTime(ms)", "RoutingInfoTime(ms)", "GenerateTime(ms)", "TotalCompilationTime(ms)", "ExecutionTime(ns)", "ProjectionTime(ns)", "RowsModificationTime(ns)", "QNNumRowsSeen", "QNMsgSendTime(ns)", "QNMsgSerTime(ns)", "QNRespDeSerTime(ns)")));
}

18 View Complete Implementation : ImageResourceIntTest.java
Copyright Apache License 2.0
Author : otto-de
/**
 * Executes the search, and checks that the default enreplacedy is not returned
 */
private void defaultImageShouldNotBeFound(String filter) throws Exception {
    restImageMockMvc.perform(get("/api/images?sort=id,desc&" + filter)).andExpect(status().isOk()).andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)).andExpect(jsonPath("$").isArray()).andExpect(jsonPath("$").isEmpty());
}

18 View Complete Implementation : PulseControllerJUnitTest.java
Copyright Apache License 2.0
Author : apache
@Test
public void pulseUpdateForClusterSelectedRegion() throws Exception {
    this.mockMvc.perform(post("/pulseUpdate").param("pulseData", "{\"ClusterSelectedRegion\":{\"regionFullPath\":\"" + REGION_PATH + "\"}}").principal(principal).accept(MediaType.parseMediaType(MediaType.APPLICATION_JSON_UTF8_VALUE))).andExpect(status().isOk()).andExpect(jsonPath("$.ClusterSelectedRegion.selectedRegion.lruEvictionRate").value(0D)).andExpect(jsonPath("$.ClusterSelectedRegion.selectedRegion.getsRate").value(27.99D)).andExpect(jsonPath("$.ClusterSelectedRegion.selectedRegion.emptyNodes").value(0)).andExpect(jsonPath("$.ClusterSelectedRegion.selectedRegion.type").value(REGION_TYPE)).andExpect(jsonPath("$.ClusterSelectedRegion.selectedRegion.isEnableOffHeapMemory").value("OFF")).andExpect(jsonPath("$.ClusterSelectedRegion.selectedRegion.path").value(REGION_PATH)).andExpect(jsonPath("$.ClusterSelectedRegion.selectedRegion.members[0].cpuUsage").value(55.77D)).andExpect(jsonPath("$.ClusterSelectedRegion.selectedRegion.members[0].clients").value(1)).andExpect(jsonPath("$.ClusterSelectedRegion.selectedRegion.members[0].heapUsage").value(0)).andExpect(jsonPath("$.ClusterSelectedRegion.selectedRegion.members[0].name").value(MEMBER_NAME)).andExpect(jsonPath("$.ClusterSelectedRegion.selectedRegion.members[0].currentHeapUsage").value(0)).andExpect(jsonPath("$.ClusterSelectedRegion.selectedRegion.members[0].isManager").value(false)).andExpect(jsonPath("$.ClusterSelectedRegion.selectedRegion.members[0].threads").value(0)).andExpect(jsonPath("$.ClusterSelectedRegion.selectedRegion.members[0].memberId").value(MEMBER_ID)).andExpect(jsonPath("$.ClusterSelectedRegion.selectedRegion.members[0].uptime").value("0 Hours 0 Mins 1 Secs")).andExpect(jsonPath("$.ClusterSelectedRegion.selectedRegion.memoryReadsTrend").isEmpty()).andExpect(jsonPath("$.ClusterSelectedRegion.selectedRegion.diskWritesTrend").isEmpty()).andExpect(jsonPath("$.ClusterSelectedRegion.selectedRegion.dataUsage").value(0)).andExpect(jsonPath("$.ClusterSelectedRegion.selectedRegion.regionPath").value(REGION_PATH)).andExpect(jsonPath("$.ClusterSelectedRegion.selectedRegion.diskReadsTrend").isEmpty()).andExpect(jsonPath("$.ClusterSelectedRegion.selectedRegion.memoryUsage").value("0.0000")).andExpect(jsonPath("$.ClusterSelectedRegion.selectedRegion.wanEnabled").value(false)).andExpect(jsonPath("$.ClusterSelectedRegion.selectedRegion.memberCount").value(1)).andExpect(jsonPath("$.ClusterSelectedRegion.selectedRegion.putsRate").value(12.31D)).andExpect(jsonPath("$.ClusterSelectedRegion.selectedRegion.totalMemory").value(0)).andExpect(jsonPath("$.ClusterSelectedRegion.selectedRegion.entryCount").value(0)).andExpect(jsonPath("$.ClusterSelectedRegion.selectedRegion.compressionCodec").value("NA")).andExpect(jsonPath("$.ClusterSelectedRegion.selectedRegion.name").value(REGION_NAME)).andExpect(jsonPath("$.ClusterSelectedRegion.selectedRegion.systemRegionEntryCount").value(0)).andExpect(jsonPath("$.ClusterSelectedRegion.selectedRegion.persistence").value("OFF")).andExpect(jsonPath("$.ClusterSelectedRegion.selectedRegion.memoryWritesTrend").isEmpty()).andExpect(jsonPath("$.ClusterSelectedRegion.selectedRegion.entrySize").value("0.0000"));
}

18 View Complete Implementation : BadgeResourceIntTest.java
Copyright Apache License 2.0
Author : otto-de
/**
 * Executes the search, and checks that the default enreplacedy is not returned
 */
private void defaultBadgeShouldNotBeFound(String filter) throws Exception {
    restBadgeMockMvc.perform(get("/api/badges?sort=id,desc&" + filter)).andExpect(status().isOk()).andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)).andExpect(jsonPath("$").isArray()).andExpect(jsonPath("$").isEmpty());
}

18 View Complete Implementation : PulseControllerJUnitTest.java
Copyright Apache License 2.0
Author : apache
@Test
public void acknowledgeAlert() throws Exception {
    this.mockMvc.perform(get("/acknowledgeAlert").param("alertId", "1").accept(MediaType.parseMediaType(MediaType.APPLICATION_JSON_UTF8_VALUE))).andExpect(status().isOk()).andExpect(jsonPath("$.status").value("deleted"));
}

18 View Complete Implementation : PulseControllerJUnitTest.java
Copyright Apache License 2.0
Author : apache
@Test
public void pulseUpdateForClusterGCPauses() throws Exception {
    this.mockMvc.perform(post("/pulseUpdate").param("pulseData", "{\"ClusterJVMPauses\":\"{}\"}").principal(principal).accept(MediaType.parseMediaType(MediaType.APPLICATION_JSON_UTF8_VALUE))).andExpect(status().isOk()).andExpect(jsonPath("$.ClusterJVMPauses.currentGCPauses").value(0)).andExpect(jsonPath("$.ClusterJVMPauses.gCPausesTrend").isEmpty());
}

18 View Complete Implementation : PulseControllerJUnitTest.java
Copyright Apache License 2.0
Author : apache
@Test
public void pulseUpdateForClusterSelectedRegionsMember() throws Exception {
    this.mockMvc.perform(post("/pulseUpdate").param("pulseData", "{\"ClusterSelectedRegionsMember\":{\"regionFullPath\":\"" + REGION_PATH + "\"}}").principal(principal).accept(MediaType.parseMediaType(MediaType.APPLICATION_JSON_UTF8_VALUE))).andExpect(status().isOk()).andExpect(jsonPath("$.ClusterSelectedRegionsMember.selectedRegionsMembers.%s.diskReadsTrend", MEMBER_NAME).isEmpty()).andExpect(jsonPath("$.ClusterSelectedRegionsMember.selectedRegionsMembers.%s.regionFullPath", MEMBER_NAME).value(REGION_PATH)).andExpect(jsonPath("$.ClusterSelectedRegionsMember.selectedRegionsMembers.%s.entryCount", MEMBER_NAME).value(0)).andExpect(jsonPath("$.ClusterSelectedRegionsMember.selectedRegionsMembers.%s.accessor", MEMBER_NAME).value("True")).andExpect(jsonPath("$.ClusterSelectedRegionsMember.selectedRegionsMembers.%s.memberName", MEMBER_NAME).value(MEMBER_NAME)).andExpect(jsonPath("$.ClusterSelectedRegionsMember.selectedRegionsMembers.%s.memoryReadsTrend", MEMBER_NAME).isEmpty()).andExpect(jsonPath("$.ClusterSelectedRegionsMember.selectedRegionsMembers.%s.diskWritesTrend", MEMBER_NAME).isEmpty()).andExpect(jsonPath("$.ClusterSelectedRegionsMember.selectedRegionsMembers.%s.memoryWritesTrend", MEMBER_NAME).isEmpty()).andExpect(jsonPath("$.ClusterSelectedRegionsMember.selectedRegionsMembers.%s.entrySize", MEMBER_NAME).value(0)).andExpect(jsonPath("$.ClusterSelectedRegionsMember.clusterName").value(CLUSTER_NAME)).andExpect(jsonPath("$.ClusterSelectedRegionsMember.userName").value(PRINCIPAL_USER));
}

18 View Complete Implementation : PulseControllerJUnitTest.java
Copyright Apache License 2.0
Author : apache
@Test
public void pulseUpdateForMemberDetails() throws Exception {
    this.mockMvc.perform(post("/pulseUpdate").param("pulseData", "{\"MemberDetails\":{\"memberName\":\"" + MEMBER_NAME + "\"}}").principal(principal).accept(MediaType.parseMediaType(MediaType.APPLICATION_JSON_UTF8_VALUE))).andExpect(status().isOk()).andExpect(jsonPath("$.MemberDetails.name").value(MEMBER_NAME)).andExpect(jsonPath("$.MemberDetails.offHeapUsedSize").value(0)).andExpect(jsonPath("$.MemberDetails.diskStorageUsed").value(0D)).andExpect(jsonPath("$.MemberDetails.regionsCount").value(1)).andExpect(jsonPath("$.MemberDetails.clusterName").value(CLUSTER_NAME)).andExpect(jsonPath("$.MemberDetails.name").value(MEMBER_NAME)).andExpect(jsonPath("$.MemberDetails.threads").value(0)).andExpect(jsonPath("$.MemberDetails.clusterId").isNotEmpty()).andExpect(jsonPath("$.MemberDetails.numClients").value(1)).andExpect(jsonPath("$.MemberDetails.userName").value(PRINCIPAL_USER)).andExpect(jsonPath("$.MemberDetails.offHeapFreeSize").value(0)).andExpect(jsonPath("$.MemberDetails.memberId").value(MEMBER_ID)).andExpect(jsonPath("$.MemberDetails.status").value("Normal"));
}

18 View Complete Implementation : DimensionResourceIntTest.java
Copyright Apache License 2.0
Author : otto-de
/**
 * Executes the search, and checks that the default enreplacedy is not returned
 */
private void defaultDimensionShouldNotBeFound(String filter) throws Exception {
    restDimensionMockMvc.perform(get("/api/dimensions?sort=id,desc&" + filter)).andExpect(status().isOk()).andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)).andExpect(jsonPath("$").isArray()).andExpect(jsonPath("$").isEmpty());
}

18 View Complete Implementation : PulseControllerJUnitTest.java
Copyright Apache License 2.0
Author : apache
@Test
public void pulseUpdateForQueryStatistics() throws Exception {
    this.mockMvc.perform(post("/pulseUpdate").param("pulseData", "{\"QueryStatistics\":\"{}\"}").principal(principal).accept(MediaType.parseMediaType(MediaType.APPLICATION_JSON_UTF8_VALUE))).andExpect(status().isOk()).andExpect(jsonPath("$.QueryStatistics.queriesList").isEmpty()).andExpect(jsonPath("$.QueryStatistics.connectedFlag").value(false)).andExpect(jsonPath("$.QueryStatistics.connectedErrorMsg").value(""));
}

18 View Complete Implementation : ReportResourceIntTest.java
Copyright Apache License 2.0
Author : otto-de
/**
 * Executes the search, and checks that the default enreplacedy is not returned
 */
private void defaultReportShouldNotBeFound(String filter) throws Exception {
    restReportMockMvc.perform(get("/api/reports?sort=id,desc&" + filter)).andExpect(status().isOk()).andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)).andExpect(jsonPath("$").isArray()).andExpect(jsonPath("$").isEmpty());
}

18 View Complete Implementation : PulseControllerJUnitTest.java
Copyright Apache License 2.0
Author : apache
@Test
public void pulseUpdateForMemberHeapUsage() throws Exception {
    this.mockMvc.perform(post("/pulseUpdate").param("pulseData", "{\"MemberHeapUsage\":{\"memberName\":\"" + MEMBER_NAME + "\"}}").principal(principal).accept(MediaType.parseMediaType(MediaType.APPLICATION_JSON_UTF8_VALUE))).andExpect(status().isOk()).andExpect(jsonPath("$.MemberHeapUsage.heapUsageTrend").isEmpty()).andExpect(jsonPath("$.MemberHeapUsage.currentHeapUsage").value(0));
}

18 View Complete Implementation : CommentResourceIntTest.java
Copyright Apache License 2.0
Author : otto-de
/**
 * Executes the search, and checks that the default enreplacedy is not returned
 */
private void defaultCommentShouldNotBeFound(String filter) throws Exception {
    restCommentMockMvc.perform(get("/api/comments?sort=id,desc&" + filter)).andExpect(status().isOk()).andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)).andExpect(jsonPath("$").isArray()).andExpect(jsonPath("$").isEmpty());
}

18 View Complete Implementation : PulseControllerJUnitTest.java
Copyright Apache License 2.0
Author : apache
@Test
public void pulseUpdateForMemberClients() throws Exception {
    this.mockMvc.perform(post("/pulseUpdate").param("pulseData", "{\"MemberClients\":{\"memberName\":\"" + MEMBER_NAME + "\"}}").principal(principal).accept(MediaType.parseMediaType(MediaType.APPLICATION_JSON_UTF8_VALUE))).andExpect(status().isOk()).andExpect(jsonPath("$.MemberClients.name").value(MEMBER_NAME)).andExpect(jsonPath("$.MemberClients.memberClients[0].puts").value(0)).andExpect(jsonPath("$.MemberClients.memberClients[0].cpuUsage").value("0.0000")).andExpect(jsonPath("$.MemberClients.memberClients[0].clientId").value("100")).andExpect(jsonPath("$.MemberClients.memberClients[0].queueSize").value(0)).andExpect(jsonPath("$.MemberClients.memberClients[0].clientCQCount").value(0)).andExpect(jsonPath("$.MemberClients.memberClients[0].name").value(CLIENT_NAME)).andExpect(jsonPath("$.MemberClients.memberClients[0].isConnected").value("No")).andExpect(jsonPath("$.MemberClients.memberClients[0].threads").value(0)).andExpect(jsonPath("$.MemberClients.memberClients[0].isSubscriptionEnabled").value("No")).andExpect(jsonPath("$.MemberClients.memberClients[0].gets").value(0)).andExpect(jsonPath("$.MemberClients.memberClients[0].uptime").value("0 Hours 0 Mins 1 Secs"));
}

18 View Complete Implementation : BadgeSkillResourceIntTest.java
Copyright Apache License 2.0
Author : otto-de
/**
 * Executes the search, and checks that the default enreplacedy is not returned
 */
private void defaultBadgeSkillShouldNotBeFound(String filter) throws Exception {
    restBadgeSkillMockMvc.perform(get("/api/badge-skills?sort=id,desc&" + filter)).andExpect(status().isOk()).andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)).andExpect(jsonPath("$").isArray()).andExpect(jsonPath("$").isEmpty());
}

18 View Complete Implementation : PulseControllerJUnitTest.java
Copyright Apache License 2.0
Author : apache
@Test
public void pulseUpdateForClusterWANInfo() throws Exception {
    this.mockMvc.perform(post("/pulseUpdate").param("pulseData", "{\"ClusterWANInfo\":\"{}\"}").principal(principal).accept(MediaType.parseMediaType(MediaType.APPLICATION_JSON_UTF8_VALUE))).andExpect(status().isOk()).andExpect(jsonPath("$.ClusterWANInfo.connectedClusters").isEmpty());
}

18 View Complete Implementation : PulseControllerJUnitTest.java
Copyright Apache License 2.0
Author : apache
@Test
public void authenticateUserLoggedIn() throws Exception {
    this.mockMvc.perform(get("/authenticateUser").principal(principal).accept(MediaType.parseMediaType(MediaType.APPLICATION_JSON_UTF8_VALUE))).andExpect(status().isOk()).andExpect(jsonPath("$.isUserLoggedIn").value(true));
}

18 View Complete Implementation : PulseControllerJUnitTest.java
Copyright Apache License 2.0
Author : apache
@Test
public void pulseUpdateForClusterDetails() throws Exception {
    this.mockMvc.perform(post("/pulseUpdate").param("pulseData", "{\"ClusterDetails\":\"{}\"}").principal(principal).accept(MediaType.parseMediaType(MediaType.APPLICATION_JSON_UTF8_VALUE))).andExpect(status().isOk()).andExpect(jsonPath("$.ClusterDetails.userName").value(PRINCIPAL_USER)).andExpect(jsonPath("$.ClusterDetails.totalHeap").value(0D)).andExpect(jsonPath("$.ClusterDetails.clusterName").value(CLUSTER_NAME));
}

18 View Complete Implementation : PulseControllerJUnitTest.java
Copyright Apache License 2.0
Author : apache
@Test
public void pulseUpdateForMemberAsynchEventQueues() throws Exception {
    this.mockMvc.perform(post("/pulseUpdate").param("pulseData", "{\"MemberAsynchEventQueues\":{\"memberName\":\"" + MEMBER_NAME + "\"}}").principal(principal).accept(MediaType.parseMediaType(MediaType.APPLICATION_JSON_UTF8_VALUE))).andExpect(status().isOk()).andExpect(jsonPath("$.MemberAsynchEventQueues.isAsyncEventQueuesPresent").value(true)).andExpect(jsonPath("$.MemberAsynchEventQueues.asyncEventQueues[0].batchTimeInterval").value(0)).andExpect(jsonPath("$.MemberAsynchEventQueues.asyncEventQueues[0].batchConflationEnabled").value(false)).andExpect(jsonPath("$.MemberAsynchEventQueues.asyncEventQueues[0].queueSize").value(0)).andExpect(jsonPath("$.MemberAsynchEventQueues.asyncEventQueues[0].senderType").value(false)).andExpect(jsonPath("$.MemberAsynchEventQueues.asyncEventQueues[0].asyncEventListener").value(AEQ_LISTENER)).andExpect(jsonPath("$.MemberAsynchEventQueues.asyncEventQueues[0].batchSize").value(0)).andExpect(jsonPath("$.MemberAsynchEventQueues.asyncEventQueues[0].primary").value(false));
}

18 View Complete Implementation : PulseControllerJUnitTest.java
Copyright Apache License 2.0
Author : apache
@Test
public void pulseUpdateForMemberGCPauses() throws Exception {
    this.mockMvc.perform(post("/pulseUpdate").param("pulseData", "{\"MemberGCPauses\":{\"memberName\":\"" + MEMBER_NAME + "\"}}").principal(principal).accept(MediaType.parseMediaType(MediaType.APPLICATION_JSON_UTF8_VALUE))).andExpect(status().isOk()).andExpect(jsonPath("$.MemberGCPauses.gcPausesCount").value(0)).andExpect(jsonPath("$.MemberGCPauses.gcPausesTrend").isEmpty());
}

18 View Complete Implementation : PulseControllerJUnitTest.java
Copyright Apache License 2.0
Author : apache
@Test
public void pulseUpdateForClusterMemoryUsage() throws Exception {
    this.mockMvc.perform(post("/pulseUpdate").param("pulseData", "{\"ClusterMemoryUsage\":\"{}\"}").principal(principal).accept(MediaType.parseMediaType(MediaType.APPLICATION_JSON_UTF8_VALUE))).andExpect(status().isOk()).andExpect(jsonPath("$.ClusterMemoryUsage.currentMemoryUsage").value(0)).andExpect(jsonPath("$.ClusterMemoryUsage.memoryUsageTrend", containsInAnyOrder(1, 2, 3)));
}

18 View Complete Implementation : PulseControllerJUnitTest.java
Copyright Apache License 2.0
Author : apache
@Test
public void clearAlerts() throws Exception {
    this.mockMvc.perform(get("/clearAlerts").param("alertType", "1").accept(MediaType.parseMediaType(MediaType.APPLICATION_JSON_UTF8_VALUE))).andExpect(status().isOk()).andExpect(jsonPath("$.pageNumber").value(1)).andExpect(jsonPath("$.systemAlerts").isEmpty()).andExpect(jsonPath("$.connectedFlag").value(false)).andExpect(jsonPath("$.status").value("deleted"));
}

18 View Complete Implementation : PulseControllerJUnitTest.java
Copyright Apache License 2.0
Author : apache
@Test
public void dataBrowserExportWithExceptionResult() throws Exception {
    doThrow(new IllegalStateException()).when(cluster).executeQuery(anyString(), anyString(), anyInt());
    String query = "SELECT * FROM " + REGION_PATH;
    this.mockMvc.perform(get("/dataBrowserExport").param("query", query).param("members", MEMBER_NAME).principal(principal).accept(MediaType.parseMediaType(MediaType.APPLICATION_JSON_UTF8_VALUE))).andExpect(status().isOk()).andExpect(header().string("Content-Disposition", "attachment; filename=results.json")).andExpect(content().string("{}"));
    // Verify cluster addQueryInHistory is invoked
    verify(this.cluster).addQueryInHistory(query, principal.getName());
}

18 View Complete Implementation : PulseControllerJUnitTest.java
Copyright Apache License 2.0
Author : apache
@Test
public void pulseUpdateForMemberRegions() throws Exception {
    this.mockMvc.perform(post("/pulseUpdate").param("pulseData", "{\"MemberRegions\":{\"memberName\":\"" + MEMBER_NAME + "\"}}").principal(principal).accept(MediaType.parseMediaType(MediaType.APPLICATION_JSON_UTF8_VALUE))).andExpect(status().isOk()).andExpect(jsonPath("$.MemberRegions.name").value(MEMBER_NAME)).andExpect(jsonPath("$.MemberRegions.memberRegions[0].fullPath").value(REGION_PATH)).andExpect(jsonPath("$.MemberRegions.memberRegions[0].entryCount").value(0)).andExpect(jsonPath("$.MemberRegions.memberRegions[0].name").value(REGION_NAME)).andExpect(jsonPath("$.MemberRegions.memberRegions[0].diskStoreName").value("")).andExpect(jsonPath("$.MemberRegions.memberRegions[0].gatewayEnabled").value(false)).andExpect(jsonPath("$.MemberRegions.memberRegions[0].entrySize").value("0.0000")).andExpect(jsonPath("$.MemberRegions.memberId").value(MEMBER_ID)).andExpect(jsonPath("$.MemberRegions.status").value("Normal"));
}

18 View Complete Implementation : PulseControllerJUnitTest.java
Copyright Apache License 2.0
Author : apache
@Test
public void pulseUpdateForPulseVersion() throws Exception {
    this.mockMvc.perform(post("/pulseUpdate").param("pulseData", "{\"PulseVersion\":\"{}\"}").principal(principal).accept(MediaType.parseMediaType(MediaType.APPLICATION_JSON_UTF8_VALUE))).andExpect(status().isOk()).andExpect(jsonPath("$.PulseVersion.sourceDate").value("not empty")).andExpect(jsonPath("$.PulseVersion.sourceRepository").value("not empty")).andExpect(jsonPath("$.PulseVersion.pulseVersion").value("not empty")).andExpect(jsonPath("$.PulseVersion.sourceRevision").value("not empty")).andExpect(jsonPath("$.PulseVersion.buildId").value("not empty")).andExpect(jsonPath("$.PulseVersion.buildDate").value("not empty"));
}

18 View Complete Implementation : PulseControllerJUnitTest.java
Copyright Apache License 2.0
Author : apache
@Test
public void pulseUpdateForMemberKeyStatistics() throws Exception {
    this.mockMvc.perform(post("/pulseUpdate").param("pulseData", "{\"MemberKeyStatistics\":{\"memberName\":\"" + MEMBER_NAME + "\"}}").principal(principal).accept(MediaType.parseMediaType(MediaType.APPLICATION_JSON_UTF8_VALUE))).andExpect(status().isOk()).andExpect(jsonPath("$.MemberKeyStatistics.readPerSecTrend").isEmpty()).andExpect(jsonPath("$.MemberKeyStatistics.cpuUsageTrend").isEmpty()).andExpect(jsonPath("$.MemberKeyStatistics.memoryUsageTrend").isEmpty()).andExpect(jsonPath("$.MemberKeyStatistics.writePerSecTrend").isEmpty());
}

18 View Complete Implementation : PulseControllerJUnitTest.java
Copyright Apache License 2.0
Author : apache
@Test
public void pulseUpdateForMemberDiskThroughput() throws Exception {
    this.mockMvc.perform(post("/pulseUpdate").param("pulseData", "{\"MemberDiskThroughput\":{\"memberName\":\"" + MEMBER_NAME + "\"}}").principal(principal).accept(MediaType.parseMediaType(MediaType.APPLICATION_JSON_UTF8_VALUE))).andExpect(status().isOk()).andExpect(jsonPath("$.MemberDiskThroughput.throughputWritesTrend").isEmpty()).andExpect(jsonPath("$.MemberDiskThroughput.throughputReadsTrend").isEmpty()).andExpect(jsonPath("$.MemberDiskThroughput.throughputWrites").value(0D)).andExpect(jsonPath("$.MemberDiskThroughput.throughputReads").value(0D));
}

18 View Complete Implementation : SkillResourceIntTest.java
Copyright Apache License 2.0
Author : otto-de
/**
 * Executes the search, and checks that the default enreplacedy is not returned
 */
private void defaultSkillShouldNotBeFound(String filter) throws Exception {
    restSkillMockMvc.perform(get("/api/skills?sort=id,desc&" + filter)).andExpect(status().isOk()).andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)).andExpect(jsonPath("$").isArray()).andExpect(jsonPath("$").isEmpty());
}

18 View Complete Implementation : PulseControllerJUnitTest.java
Copyright Apache License 2.0
Author : apache
@Test
public void dataBrowserQueryHistory() throws Exception {
    dataBrowserQuery();
    this.mockMvc.perform(get("/dataBrowserQueryHistory").param("action", "view").principal(principal).accept(MediaType.parseMediaType(MediaType.APPLICATION_JSON_UTF8_VALUE))).andExpect(status().isOk()).andExpect(jsonPath("$.queryHistory[0].queryText").value("\"SELECT * FROM " + REGION_PATH + "\""));
}

18 View Complete Implementation : SkillResourceIntTest.java
Copyright Apache License 2.0
Author : otto-de
/**
 * Executes the search, and checks that the default enreplacedy is returned
 */
private void defaultSkillShouldBeFound(String filter) throws Exception {
    restSkillMockMvc.perform(get("/api/skills?sort=id,desc&" + filter)).andExpect(status().isOk()).andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)).andExpect(jsonPath("$.[*].id").value(hasItem(skill.getId().intValue()))).andExpect(jsonPath("$.[*].replacedle").value(hasItem(DEFAULT_replacedLE.toString()))).andExpect(jsonPath("$.[*].description").value(hasItem(DEFAULT_DESCRIPTION.toString()))).andExpect(jsonPath("$.[*].implementation").value(hasItem(DEFAULT_IMPLEMENTATION.toString()))).andExpect(jsonPath("$.[*].validation").value(hasItem(DEFAULT_VALIDATION.toString()))).andExpect(jsonPath("$.[*].expiryPeriod").value(hasItem(DEFAULT_EXPIRY_PERIOD))).andExpect(jsonPath("$.[*].contact").value(hasItem(DEFAULT_CONTACT.toString()))).andExpect(jsonPath("$.[*].score").value(hasItem(DEFAULT_SCORE))).andExpect(jsonPath("$.[*].contact").value(hasItem(DEFAULT_CONTACT.toString()))).andExpect(jsonPath("$.[*].rateScore").value(hasItem(DEFAULT_RATE_SCORE.doubleValue()))).andExpect(jsonPath("$.[*].rateCount").value(hasItem(DEFAULT_RATE_COUNT)));
}

18 View Complete Implementation : PulseControllerJUnitTest.java
Copyright Apache License 2.0
Author : apache
@Test
public void authenticateUserNotLoggedIn() throws Exception {
    this.mockMvc.perform(get("/authenticateUser").accept(MediaType.parseMediaType(MediaType.APPLICATION_JSON_UTF8_VALUE))).andExpect(status().isOk()).andExpect(jsonPath("$.isUserLoggedIn").value(false));
}

18 View Complete Implementation : LevelResourceIntTest.java
Copyright Apache License 2.0
Author : otto-de
/**
 * Executes the search, and checks that the default enreplacedy is not returned
 */
private void defaultLevelShouldNotBeFound(String filter) throws Exception {
    restLevelMockMvc.perform(get("/api/levels?sort=id,desc&" + filter)).andExpect(status().isOk()).andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)).andExpect(jsonPath("$").isArray()).andExpect(jsonPath("$").isEmpty());
}

18 View Complete Implementation : PulseControllerJUnitTest.java
Copyright Apache License 2.0
Author : apache
@Test
public void pulseUpdateForClusterDiskThroughput() throws Exception {
    this.mockMvc.perform(post("/pulseUpdate").param("pulseData", "{\"ClusterDiskThroughput\":\"{}\"}").principal(principal).accept(MediaType.parseMediaType(MediaType.APPLICATION_JSON_UTF8_VALUE))).andExpect(status().isOk()).andExpect(jsonPath("$.ClusterDiskThroughput.currentThroughputWrites").value(0D)).andExpect(jsonPath("$.ClusterDiskThroughput.throughputReads", contains(1, 2, 3))).andExpect(jsonPath("$.ClusterDiskThroughput.currentThroughputReads").value(0D)).andExpect(jsonPath("$.ClusterDiskThroughput.throughputWrites", contains(4, 5, 6)));
}

18 View Complete Implementation : ActivityResourceIntTest.java
Copyright Apache License 2.0
Author : otto-de
/**
 * Executes the search, and checks that the default enreplacedy is not returned
 */
private void defaultActivityShouldNotBeFound(String filter) throws Exception {
    restActivityMockMvc.perform(get("/api/activities?sort=id,desc&" + filter)).andExpect(status().isOk()).andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)).andExpect(jsonPath("$").isArray()).andExpect(jsonPath("$").isEmpty());
}

18 View Complete Implementation : PulseControllerJUnitTest.java
Copyright Apache License 2.0
Author : apache
@Test
public void pulseUpdateForClusterMembersRGraph() throws Exception {
    this.mockMvc.perform(post("/pulseUpdate").param("pulseData", "{\"ClusterMembersRGraph\":\"{}\"}").principal(principal).accept(MediaType.parseMediaType(MediaType.APPLICATION_JSON_UTF8_VALUE))).andExpect(status().isOk()).andExpect(jsonPath("$.ClusterMembersRGraph.memberCount").value(0)).andExpect(jsonPath("$.ClusterMembersRGraph.clustor.data").isEmpty()).andExpect(jsonPath("$.ClusterMembersRGraph.clustor.name").value(0)).andExpect(jsonPath("$.ClusterMembersRGraph.clustor.id").value(0)).andExpect(jsonPath("$.ClusterMembersRGraph.clustor.children[0].id").value(PHYSICAL_HOST_NAME)).andExpect(jsonPath("$.ClusterMembersRGraph.clustor.children[0].name").value(PHYSICAL_HOST_NAME)).andExpect(jsonPath("$.ClusterMembersRGraph.clustor.children[0].data.loadAvg").value(0D)).andExpect(jsonPath("$.ClusterMembersRGraph.clustor.children[0].data.sockets").value(0)).andExpect(jsonPath("$.ClusterMembersRGraph.clustor.children[0].data.threads").value(0)).andExpect(jsonPath("$.ClusterMembersRGraph.clustor.children[0].data.cpuUsage").value(0D)).andExpect(jsonPath("$.ClusterMembersRGraph.clustor.children[0].data.memoryUsage").value(0)).andExpect(jsonPath("$.ClusterMembersRGraph.clustor.children[0].data.hostStatus").value("Normal")).andExpect(jsonPath("$.ClusterMembersRGraph.clustor.children[0].data.$type").value("hostNormalNode")).andExpect(jsonPath("$.ClusterMembersRGraph.clustor.children[0].children[0].id").value(MEMBER_ID)).andExpect(jsonPath("$.ClusterMembersRGraph.clustor.children[0].children[0].name").value(MEMBER_NAME)).andExpect(jsonPath("$.ClusterMembersRGraph.clustor.children[0].children[0].data.gemfireVersion").value(GEMFIRE_VERSION)).andExpect(jsonPath("$.ClusterMembersRGraph.clustor.children[0].children[0].data.memoryUsage").value(0)).andExpect(jsonPath("$.ClusterMembersRGraph.clustor.children[0].children[0].data.cpuUsage").value(55.77D)).andExpect(jsonPath("$.ClusterMembersRGraph.clustor.children[0].children[0].data.regions").value(1)).andExpect(jsonPath("$.ClusterMembersRGraph.clustor.children[0].children[0].data.host").value(PHYSICAL_HOST_NAME)).andExpect(jsonPath("$.ClusterMembersRGraph.clustor.children[0].children[0].data.port").value("-")).andExpect(jsonPath("$.ClusterMembersRGraph.clustor.children[0].children[0].data.clients").value(1)).andExpect(jsonPath("$.ClusterMembersRGraph.clustor.children[0].children[0].data.gcPauses").value(0)).andExpect(jsonPath("$.ClusterMembersRGraph.clustor.children[0].children[0].data.numThreads").value(0)).andExpect(jsonPath("$.ClusterMembersRGraph.clustor.children[0].children[0].data.nodeType").value("memberNormalNode")).andExpect(jsonPath("$.ClusterMembersRGraph.clustor.children[0].children[0].data.$type").value("memberNormalNode")).andExpect(jsonPath("$.ClusterMembersRGraph.clustor.children[0].children[0].data.gatewaySender").value(0)).andExpect(jsonPath("$.ClusterMembersRGraph.clustor.children[0].children[0].data.gatewayReceiver").value(0)).andExpect(jsonPath("$.ClusterMembersRGraph.clustor.children[0].children[0].children").isEmpty());
}

18 View Complete Implementation : LevelResourceIntTest.java
Copyright Apache License 2.0
Author : otto-de
/**
 * Executes the search, and checks that the default enreplacedy is returned
 */
private void defaultLevelShouldBeFound(String filter) throws Exception {
    restLevelMockMvc.perform(get("/api/levels?sort=id,desc&" + filter)).andExpect(status().isOk()).andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)).andExpect(jsonPath("$.[*].id").value(hasItem(level.getId().intValue()))).andExpect(jsonPath("$.[*].name").value(hasItem(DEFAULT_NAME.toString()))).andExpect(jsonPath("$.[*].description").value(hasItem(DEFAULT_DESCRIPTION.toString()))).andExpect(jsonPath("$.[*].requiredScore").value(hasItem(DEFAULT_REQUIRED_SCORE.doubleValue()))).andExpect(jsonPath("$.[*].instantMultiplier").value(hasItem(DEFAULT_INSTANT_MULTIPLIER.doubleValue()))).andExpect(jsonPath("$.[*].completionBonus").value(hasItem(DEFAULT_COMPLETION_BONUS)));
}

18 View Complete Implementation : PulseControllerJUnitTest.java
Copyright Apache License 2.0
Author : apache
@Test
public void dataBrowserQueryWithExceptionResult() throws Exception {
    doThrow(new IllegalStateException()).when(cluster).executeQuery(anyString(), anyString(), anyInt());
    String query = "SELECT * FROM " + REGION_PATH;
    this.mockMvc.perform(get("/dataBrowserQuery").param("query", query).param("members", MEMBER_NAME).principal(principal).accept(MediaType.parseMediaType(MediaType.APPLICATION_JSON_UTF8_VALUE))).andExpect(status().isOk()).andExpect(content().string("{}"));
    // Verify cluster addQueryInHistory is invoked
    verify(this.cluster).addQueryInHistory(query, principal.getName());
}

18 View Complete Implementation : TeamResourceIntTest.java
Copyright Apache License 2.0
Author : otto-de
/**
 * Executes the search, and checks that the default enreplacedy is not returned
 */
private void defaultTeamShouldNotBeFound(String filter) throws Exception {
    restTeamMockMvc.perform(get("/api/teams?sort=id,desc&" + filter)).andExpect(status().isOk()).andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)).andExpect(jsonPath("$").isArray()).andExpect(jsonPath("$").isEmpty());
}

18 View Complete Implementation : PulseControllerJUnitTest.java
Copyright Apache License 2.0
Author : apache
@Test
public void pulseUpdateForSystemAlerts() throws Exception {
    this.mockMvc.perform(post("/pulseUpdate").param("pulseData", "{\"SystemAlerts\":{\"pageNumber\":\"1\"}}").principal(principal).accept(MediaType.parseMediaType(MediaType.APPLICATION_JSON_UTF8_VALUE))).andExpect(status().isOk()).andExpect(jsonPath("$.SystemAlerts.pageNumber").value(1)).andExpect(jsonPath("$.SystemAlerts.connectedFlag").value(false)).andExpect(jsonPath("$.SystemAlerts.connectedErrorMsg").value("")).andExpect(jsonPath("$.SystemAlerts.systemAlerts").isEmpty());
}

18 View Complete Implementation : PulseControllerJUnitTest.java
Copyright Apache License 2.0
Author : apache
@Test
public void pulseVersion() throws Exception {
    this.mockMvc.perform(get("/pulseVersion").accept(MediaType.parseMediaType(MediaType.APPLICATION_JSON_UTF8_VALUE))).andExpect(status().isOk()).andExpect(jsonPath("$.pulseVersion").isNotEmpty()).andExpect(jsonPath("$.buildId").isNotEmpty()).andExpect(jsonPath("$.buildDate").isNotEmpty()).andExpect(jsonPath("$.sourceDate").isNotEmpty()).andExpect(jsonPath("$.sourceRevision").isNotEmpty()).andExpect(jsonPath("$.sourceRepository").isNotEmpty());
}

18 View Complete Implementation : PulseControllerJUnitTest.java
Copyright Apache License 2.0
Author : apache
@Test
public void pulseUpdateForClusterRegions() throws Exception {
    this.mockMvc.perform(post("/pulseUpdate").param("pulseData", "{\"ClusterRegions\":\"{}\"}").principal(principal).accept(MediaType.parseMediaType(MediaType.APPLICATION_JSON_UTF8_VALUE))).andExpect(status().isOk()).andExpect(jsonPath("$.ClusterRegions.regions[0].regionPath").value(REGION_PATH)).andExpect(jsonPath("$.ClusterRegions.regions[0].diskReadsTrend").isEmpty()).andExpect(jsonPath("$.ClusterRegions.regions[0].memoryUsage").value("0.0000")).andExpect(jsonPath("$.ClusterRegions.regions[0].getsRate").value(27.99D)).andExpect(jsonPath("$.ClusterRegions.regions[0].wanEnabled").value(false)).andExpect(jsonPath("$.ClusterRegions.regions[0].memberCount").value(1)).andExpect(jsonPath("$.ClusterRegions.regions[0].memberNames[0].name").value(MEMBER_NAME)).andExpect(jsonPath("$.ClusterRegions.regions[0].memberNames[0].id").value(MEMBER_ID)).andExpect(jsonPath("$.ClusterRegions.regions[0].emptyNodes").value(0)).andExpect(jsonPath("$.ClusterRegions.regions[0].type").value(REGION_TYPE)).andExpect(jsonPath("$.ClusterRegions.regions[0].isEnableOffHeapMemory").value("OFF")).andExpect(jsonPath("$.ClusterRegions.regions[0].putsRate").value(12.31D)).andExpect(jsonPath("$.ClusterRegions.regions[0].totalMemory").value(0)).andExpect(jsonPath("$.ClusterRegions.regions[0].entryCount").value(0)).andExpect(jsonPath("$.ClusterRegions.regions[0].compressionCodec").value("NA")).andExpect(jsonPath("$.ClusterRegions.regions[0].name").value(REGION_NAME)).andExpect(jsonPath("$.ClusterRegions.regions[0].systemRegionEntryCount").value(0)).andExpect(jsonPath("$.ClusterRegions.regions[0].persistence").value("OFF")).andExpect(jsonPath("$.ClusterRegions.regions[0].memoryReadsTrend").isEmpty()).andExpect(jsonPath("$.ClusterRegions.regions[0].diskWritesTrend").isEmpty()).andExpect(jsonPath("$.ClusterRegions.regions[0].memoryWritesTrend").isEmpty()).andExpect(jsonPath("$.ClusterRegions.regions[0].dataUsage").value(0)).andExpect(jsonPath("$.ClusterRegions.regions[0].entrySize").value("0.0000"));
}

18 View Complete Implementation : PulseControllerJUnitTest.java
Copyright Apache License 2.0
Author : apache
@Test
public void pulseUpdateForClusterKeyStatistics() throws Exception {
    this.mockMvc.perform(post("/pulseUpdate").param("pulseData", "{\"ClusterKeyStatistics\":\"{}\"}").principal(principal).accept(MediaType.parseMediaType(MediaType.APPLICATION_JSON_UTF8_VALUE))).andExpect(status().isOk()).andExpect(jsonPath("$.ClusterKeyStatistics.readPerSecTrend").isEmpty()).andExpect(jsonPath("$.ClusterKeyStatistics.queriesPerSecTrend").isEmpty()).andExpect(jsonPath("$.ClusterKeyStatistics.writePerSecTrend", contains(1.29, 2.3, 3.0)));
}

18 View Complete Implementation : PulseControllerJUnitTest.java
Copyright Apache License 2.0
Author : apache
@Test
public void pulseUpdateForClusterMember() throws Exception {
    this.mockMvc.perform(post("/pulseUpdate").param("pulseData", "{\"ClusterMembers\":\"{}\"}").principal(principal).accept(MediaType.parseMediaType(MediaType.APPLICATION_JSON_UTF8_VALUE))).andExpect(status().isOk()).andExpect(jsonPath("$.ClusterMembers.members[0].serverGroups[0]").value("Default")).andExpect(jsonPath("$.ClusterMembers.members[0].cpuUsage").value(55.77D)).andExpect(jsonPath("$.ClusterMembers.members[0].clients").value(1)).andExpect(jsonPath("$.ClusterMembers.members[0].heapUsage").value(0)).andExpect(jsonPath("$.ClusterMembers.members[0].name").value(MEMBER_NAME)).andExpect(jsonPath("$.ClusterMembers.members[0].currentHeapUsage").value(0)).andExpect(jsonPath("$.ClusterMembers.members[0].isManager").value(false)).andExpect(jsonPath("$.ClusterMembers.members[0].threads").value(0)).andExpect(jsonPath("$.ClusterMembers.members[0].memberId").value(MEMBER_ID)).andExpect(jsonPath("$.ClusterMembers.members[0].redundancyZones[0]").value("Default"));
}

18 View Complete Implementation : PulseControllerJUnitTest.java
Copyright Apache License 2.0
Author : apache
@Test
public void pulseUpdateForMemberGatewayHub() throws Exception {
    this.mockMvc.perform(post("/pulseUpdate").param("pulseData", "{\"MemberGatewayHub\":{\"memberName\":\"" + MEMBER_NAME + "\"}}").principal(principal).accept(MediaType.parseMediaType(MediaType.APPLICATION_JSON_UTF8_VALUE))).andExpect(status().isOk()).andExpect(jsonPath("$.MemberGatewayHub.isGatewayReceiver").value(false)).andExpect(jsonPath("$.MemberGatewayHub.asyncEventQueues[0].batchTimeInterval").value(0)).andExpect(jsonPath("$.MemberGatewayHub.asyncEventQueues[0].batchConflationEnabled").value(false)).andExpect(jsonPath("$.MemberGatewayHub.asyncEventQueues[0].queueSize").value(0)).andExpect(jsonPath("$.MemberGatewayHub.asyncEventQueues[0].senderType").value(false)).andExpect(jsonPath("$.MemberGatewayHub.asyncEventQueues[0].asyncEventListener").value(AEQ_LISTENER)).andExpect(jsonPath("$.MemberGatewayHub.asyncEventQueues[0].batchSize").value(0)).andExpect(jsonPath("$.MemberGatewayHub.asyncEventQueues[0].primary").value(false)).andExpect(jsonPath("$.MemberGatewayHub.isGatewaySender").value(false)).andExpect(jsonPath("$.MemberGatewayHub.regionsInvolved").isEmpty()).andExpect(jsonPath("$.MemberGatewayHub.gatewaySenders").isEmpty());
}

18 View Complete Implementation : PulseControllerJUnitTest.java
Copyright Apache License 2.0
Author : apache
@Test
public void pulseUpdateForMembersList() throws Exception {
    this.mockMvc.perform(post("/pulseUpdate").param("pulseData", "{\"MembersList\":{\"memberName\":\"" + MEMBER_NAME + "\"}}").principal(principal).accept(MediaType.parseMediaType(MediaType.APPLICATION_JSON_UTF8_VALUE))).andExpect(status().isOk()).andExpect(jsonPath("$.MembersList.clusterMembers[0].name").value(MEMBER_NAME)).andExpect(jsonPath("$.MembersList.clusterMembers[0].memberId").value(MEMBER_ID)).andExpect(jsonPath("$.MembersList.clusterName").value(CLUSTER_NAME));
}