LanguageDataModel { public Language toLanguage() { return Language.create( languageId, languageString, level, learning, currentLearning ); }  Language toLanguage();  }
@Test public void toLanguage() throws Exception { model.currentLearning = true; model.languageId = "id"; model.languageString = "string"; model.learning = true; model.level = 3232; Language language = model.toLanguage(); assertThat(language.getId(), equalTo("id")); assertThat(language.getLevel(), equalTo(3232)); assertThat(language.getName(), equalTo("string")); assertThat(language.isCurrentLearning(), equalTo(true)); assertThat(language.isLearning(), equalTo(true)); }