@Test
public void testGetTypes() throws Exception {

	FreebaseHelper freebaseHelper = new FreebaseHelper();
	FreebaseRelation typesForRelationFromFreebase = freebaseHelper.getTypesForRelationFromFreebase("ns:people.person.education..education.education.degree");
	Assert.assertThat(typesForRelationFromFreebase.getDomain(), is("ns:people.person"));
	Assert.assertThat(typesForRelationFromFreebase.getRange(), is("ns:education.educational_degree"));
	typesForRelationFromFreebase = freebaseHelper.getTypesForRelationFromFreebase("ns:people.person.education..education.education.institution");
	Assert.assertThat(typesForRelationFromFreebase.getDomain(), is("ns:people.person"));
	Assert.assertThat(typesForRelationFromFreebase.getRange(), is("ns:education.educational_institution"));
	typesForRelationFromFreebase = freebaseHelper.getTypesForRelationFromFreebase("ns:base.rugby.rugby_club.coaches_of_this_team..base.rugby.rugby_coaching_tenure.coach");
	Assert.assertThat(typesForRelationFromFreebase.getDomain(), is("ns:base.rugby.rugby_club"));
	Assert.assertThat(typesForRelationFromFreebase.getRange(), is("ns:base.rugby.rugby_coach"));
	typesForRelationFromFreebase = freebaseHelper.getTypesForRelationFromFreebase("ns:education.educational_institution.students_graduates..education.education.specialization");
	Assert.assertThat(typesForRelationFromFreebase.getDomain(), is("ns:education.educational_institution"));
	Assert.assertThat(typesForRelationFromFreebase.getRange(), is("ns:education.field_of_study"));
}