Tests for constructing resources

Issue #16
- Set invalid entities in their own library;
- Created tests to validate that invalid entities throw exceptions.