public void checkProperties(
      final Collection<ODataProperty> original, final Collection<ODataProperty> actual) {
    assertTrue(original.size() <= actual.size());

    final Map<String, ODataProperty> actualProperties =
        new HashMap<String, ODataProperty>(actual.size());

    for (ODataProperty prop : actual) {
      assertFalse(actualProperties.containsKey(prop.getName()));
      actualProperties.put(prop.getName(), prop);
    }

    assertTrue(actual.size() <= actualProperties.size());

    for (ODataProperty prop : original) {
      assertNotNull(prop);
      if (actualProperties.containsKey(prop.getName())) {
        final ODataProperty actualProp = actualProperties.get(prop.getName());
        assertNotNull(actualProp);

        if (prop.getValue() != null && actualProp.getValue() != null) {
          checkPropertyValue(prop.getName(), prop.getValue(), actualProp.getValue());
        }
      }
    }
  }
  private void readGeospatial(final ODataPubFormat format) {
    final InputStream input =
        getClass().getResourceAsStream("AllGeoTypesSet_-8." + getSuffix(format));
    final ODataEntity entity =
        getClient()
            .getBinder()
            .getODataEntity(
                getClient()
                    .getDeserializer()
                    .toEntry(input, getClient().getResourceFactory().entryClassForFormat(format)));
    assertNotNull(entity);

    boolean found = false;
    for (ODataProperty property : entity.getProperties()) {
      if ("GeogMultiLine".equals(property.getName())) {
        found = true;
        assertTrue(property.hasPrimitiveValue());
        assertEquals(
            EdmSimpleType.GeographyMultiLineString.toString(),
            property.getPrimitiveValue().getTypeName());
      }
    }
    assertTrue(found);

    final ODataEntity written =
        getClient()
            .getBinder()
            .getODataEntity(
                getClient()
                    .getBinder()
                    .getEntry(
                        entity, getClient().getResourceFactory().entryClassForFormat(format)));
    assertEquals(entity, written);
  }