  @Test
  public void testMapItemSize() throws UnsupportedEncodingException {

    Map<String, AttributeValue> item = new HashMap<>();
    item.put(TEST_NAMES.get(0), new AttributeValue(TEST_STRING));
    item.put(TEST_NAMES.get(1), new AttributeValue(TEST_STRING));
    item.put(TEST_NAMES.get(2), new AttributeValue().withN(TEST_NUMBER));

    Map<String, AttributeValue> attrMap = new HashMap<>();
    attrMap.put(TEST_MAP_KEYS.get(0), new AttributeValue(TEST_STRING));
    attrMap.put(TEST_MAP_KEYS.get(1), new AttributeValue().withN(TEST_NUMBER));
    item.put(TEST_NAMES.get(3), new AttributeValue().withM(attrMap));

    List<String> allStrings = Lists.newArrayList(TEST_STRING, TEST_STRING, TEST_STRING, TEST_NUMBER, TEST_NUMBER);
    allStrings.addAll(TEST_NAMES);
    allStrings.addAll(TEST_MAP_KEYS);

    assertEquals(getExpectedItemSize(allStrings), DynamoDBUtil.getItemSizeBytes(item));
  }