Added JUnit tests for TeachingMaterialViewModel

closes #650