EntityMapper extends Mapper<T> { private int getVersion(@Nonnull final DBObject dbObject, @Nonnull final List<MapperError> errors) { assert dbObject != null; assert errors != null; final Object versionValue = dbObject.get(MongoDBKeyNames.VERSION_KEY); if ((versionValue != null) && !(versionValue instanceof Integer)) { errors.add(new MapperError(this, MongoDBKeyNames.VERSION_KEY, "Version superEntity should be of integer " + "type, but was: " + versionValue.getClass().getName())); } if (versionValue instanceof Integer) { return (Integer) versionValue; } return 0; }  int getCurrentVersion(); @Nullable @Override T fromDb(@Nullable final Object dbValue); @Nullable T fromDb(@Nonnull final DBObject dbObject, @Nonnull final List<MapperError> errors); void fromDb(@Nonnull final T entity, @Nonnull final DBObject dbObject); @Nonnull @SuppressWarnings("unchecked") T fromDb(
            @Nonnull final T entity,
            @Nonnull final DBObject dbObject,
            @Nonnull final List<MapperError> errors); @Nullable @Override DBObject toDb(@Nullable final T value); @Nonnull DBObject toDb(@Nonnull final T entity, @Nonnull final List<MapperError> errors); void toDb(
            @Nonnull final T entity,
            @Nonnull final DBObject dbObject,
            @Nonnull final List<MapperError> errors); @Nonnull List<SuperEntity> getSuperEntities(); @Nonnull @Override String toString(); boolean isInitialized(); @Nullable final Class<T> getEntityType(); @Nonnull final String getDiscriminator(); @Nonnull List<Field<?>> getFields(); @Nonnull List<Field<?>> getFieldsIncludingSuperEntities(); @Nonnull @SuppressWarnings("unchecked") EntityMapper<T2> getSubMapper(
            @Nonnull final Class<?> entityType);  }
@Test public void testGetVersion() { LOG.info("testGetVersion"); final int version = mapper.getCurrentVersion(); Assert.assertTrue(version >= 0); }