Collection<JsVariableBase.Property> properties = jsArray.getProperties();
assertEquals(2 + 1, properties.size()); // 2 array element properties and one length property.
assertEquals(4, jsArray.getLength());
SortedMap<Long, ? extends JsVariable> sparseArray = jsArray.toSparseArray();
assertEquals(2, sparseArray.size());
JsVariable firstElement = sparseArray.get(1L);
JsVariable thirdElement = sparseArray.get(3L);
assertNull(jsArray.get(-1L));
assertNull(jsArray.get(0L));
assertEquals(firstElement, jsArray.get(1L));
assertEquals("1", firstElement.getName());
assertNull(jsArray.get(2L));
assertEquals(thirdElement, jsArray.get(3L));
assertEquals("3", thirdElement.getName());
assertNull(jsArray.get(10L));
checkElementData(firstElement);
checkElementData(thirdElement);
}