BddHouseMapper implements TwoWaysMapper<GoTHouse, BddHouse> { @Override public BddHouse map(GoTHouse model) { BddHouse house = new BddHouse(); house.setHouseName(model.getName()); house.setHouseId(model.getId()); house.setHouseImageUrl(model.getImageUrl()); return house; }  @Override GoTHouse inverseMap(BddHouse model); @Override List<GoTHouse> inverseMap(List<BddHouse> listModel); @Override BddHouse map(GoTHouse model); @Override List<BddHouse> map(List<GoTHouse> listModel);  }
@Test public void should_return_correct_BddHouse_when_map() { GoTHouse character = getHouse(); BddHouse bddHouse = mapper.map(character); assertThat(bddHouse.getHouseId(), is(HOUSE_ID)); assertThat(bddHouse.getHouseName(), is(HOUSE_NAME)); assertThat(bddHouse.getHouseImageUrl(), is(HOUSE_IMAGE_URL)); }
@Test public void should_return_correct_BddHouse_list_when_map() { List<GoTHouse> goTCharacterList = getHouseList(NUMBER_OF_HOUSES); List<BddHouse> bddHouse = mapper.map(goTCharacterList); assertThat(NUMBER_OF_HOUSES, is(bddHouse.size())); for (BddHouse house : bddHouse) { assertThat(house.getHouseId(), is(HOUSE_ID)); assertThat(house.getHouseName(), is(HOUSE_NAME)); assertThat(house.getHouseImageUrl(), is(HOUSE_IMAGE_URL)); } }