@Test(groups = { "integration", "live" }) public void testListContainer() throws InterruptedException, ExecutionException, TimeoutException { String containerNameName = getContainerName(); try { ListableMap<?, ?> map = (ListableMap<?, ?>) createMap(view, containerNameName); assertConsistencyAwareListContainer(map, containerNameName); } finally { returnContainer(containerNameName); } }
returnContainer(containerName);
@Test(groups = { "integration", "live" }) public void testKeySet() throws InterruptedException, ExecutionException, TimeoutException, IOException { String containerNameName = getContainerName(); try { Map<String, V> map = createMap(view, containerNameName); assertConsistencyAwareKeySize(map, 0); putStringWithMD5(map, "one", "two"); assertConsistencyAwareKeySize(map, 1); assertConsistencyAwareKeySetEquals(map, ImmutableSet.of("one")); } finally { returnContainer(containerNameName); } }
@Test(groups = { "integration", "live" }) public void testClear() throws InterruptedException, ExecutionException, TimeoutException, IOException { String containerNameName = getContainerName(); try { Map<String, V> map = createMap(view, containerNameName); assertConsistencyAwareMapSize(map, 0); putStringWithMD5(map, "one", "apple"); assertConsistencyAwareMapSize(map, 1); map.clear(); assertConsistencyAwareMapSize(map, 0); } finally { returnContainer(containerNameName); } }
@Test(groups = { "integration", "live" }) public void testContainsKey() throws InterruptedException, ExecutionException, TimeoutException, IOException { String containerNameName = getContainerName(); try { Map<String, V> map = createMap(view, containerNameName); assertConsistencyAwareDoesntContainKey(map); putStringWithMD5(map, "one", "apple"); assertConsistencyAwareContainsKey(map); } finally { returnContainer(containerNameName); } }
@Test(groups = { "integration", "live" }) public void testIsEmpty() throws InterruptedException, ExecutionException, TimeoutException, IOException { String containerNameName = getContainerName(); try { Map<String, V> map = createMap(view, containerNameName); assertConsistencyAwareEmpty(map); putStringWithMD5(map, "one", "apple"); assertConsistencyAwareNotEmpty(map); } finally { returnContainer(containerNameName); } }