Fixed two errors in JUnit test. Test now works without error.