### Question:
PersistenceValidator { public boolean isValidEntityObject(Object entity, EntityMetadata metadata) { if (entity == null) { log.error("Entity to be persisted must not be null, operation failed"); return false; } Object id = PropertyAccessorHelper.getId(entity, metadata); if (id == null) { log.error("Entity to be persisted can't have Primary key set to null."); throw new IllegalArgumentException("Entity to be persisted can't have Primary key set to null."); } return true; } PersistenceValidator(); boolean isValidEntityObject(Object entity, EntityMetadata metadata); void validate(Object entity, KunderaMetadata kunderaMetadata);  }### Answer:
@Test public void testIsValidEntityObject() { Assert.assertFalse(new PersistenceValidator().isValidEntityObject(null, null)); }