FieldVersionType implements VersionType<T> { @Override public VersionProperty getProperty(String name) { VersionProperty versionProperty = fields.get(name); return versionProperty; } FieldVersionType(Class<T> type, VersionTypeFactory factory); @Override Collection<VersionProperty> getProperties(); @Override VersionProperty getProperty(String name); @Override A getAnnotation(Class<A> annotationType); @Override T newInstance(); String toString();  }
@Test public void fieldVersionPropertyIsCollection() { assertThat(fieldVersionType.getProperty("booleanValue").isCollection(), is(false)); assertThat(fieldVersionType.getProperty("collectionOfSimpleTypes").isCollection(), is(true)); assertThat(fieldVersionType.getProperty("collection").isCollection(), is(true)); }
@Test public void fieldVersionPropertyIsCollectionOfSimpleTypes() { assertThat(fieldVersionType.getProperty("booleanValue").isCollectionOfSimpleTypes(), is(false)); assertThat(fieldVersionType.getProperty("collectionOfSimpleTypes").isCollectionOfSimpleTypes(), is(true)); assertThat(fieldVersionType.getProperty("collection").isCollectionOfSimpleTypes(), is(false)); }
@Test public void fieldVersionPropertyIsDefault() { assertThat(fieldVersionType.getProperty("booleanValue").isDefault(this), is(true)); assertThat(fieldVersionType.getProperty("trueValue").isDefault(this), is(false)); assertThat(fieldVersionType.getProperty("characterValue").isDefault(this), is(true)); assertThat(fieldVersionType.getProperty("doubleValue").isDefault(this), is(true)); assertThat(fieldVersionType.getProperty("byteValue").isDefault(this), is(true)); assertThat(fieldVersionType.getProperty("integerValue").isDefault(this), is(false)); assertThat(fieldVersionType.getProperty("collectionOfSimpleTypes").isDefault(this), is(true)); assertThat(fieldVersionType.getProperty("collection").isDefault(this), is(true)); }