Search in sources :

Example 1 with GetMapEntryRequest

use of com.hazelcast.internal.management.request.GetMapEntryRequest in project hazelcast by hazelcast.

the class GetMapEntryRequestTest method testGetMapEntry.

@Test
public void testGetMapEntry() throws Exception {
    GetMapEntryRequest request = new GetMapEntryRequest("string", "map", "key");
    IMap<String, String> map = hz.getMap("map");
    map.put("key", "value");
    JsonObject jsonObject = new JsonObject();
    request.writeResponse(managementCenterService, jsonObject);
    JsonObject result = (JsonObject) jsonObject.get("result");
    assertEquals("value", result.get("browse_value").asString());
    assertEquals("java.lang.String", result.get("browse_class").asString());
}
Also used : GetMapEntryRequest(com.hazelcast.internal.management.request.GetMapEntryRequest) JsonObject(com.eclipsesource.json.JsonObject) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test) ParallelTest(com.hazelcast.test.annotation.ParallelTest)

Aggregations

JsonObject (com.eclipsesource.json.JsonObject)1 GetMapEntryRequest (com.hazelcast.internal.management.request.GetMapEntryRequest)1 ParallelTest (com.hazelcast.test.annotation.ParallelTest)1 QuickTest (com.hazelcast.test.annotation.QuickTest)1 Test (org.junit.Test)1