public void doesNotCreateIdIfAllPartialAttributesAreNull() {
JpaMetamodelEntityInformation<PersistableWithIdClass, Serializable> information = new JpaMetamodelEntityInformation<PersistableWithIdClass, Serializable>(
PersistableWithIdClass.class, metamodel);
PersistableWithIdClass entity = new PersistableWithIdClass(null, null);
assertThat(information.getId(entity), is(nullValue()));
entity = new PersistableWithIdClass(2L, null);
assertThat(information.getId(entity), is(notNullValue()));
}