when(company3.findElements(By.cssSelector(VACANCY_CSS))).thenReturn(vacancies);
}
@Test
public void test() {
PopularCompanies wrapper = HtmlElementLoader.create(PopularCompanies.class, webDriver);
assertThat("Wrong company number has been received", wrapper.companies.size(), is(COMPANIES_NUMBER));
for (Company company : wrapper.companies) {
assertThat("Wrong vacancy number has been received", company.vacancyList.size(), is(VACANCIES_NUMBER));
}
assertThat(wrapper.toString(), is(WRAPPER_NAME));
assertThat(wrapper.companies.toString(), is(COMPANIES_LIST_NAME));
assertThat(wrapper.companies.get(0).toString(), is(String.format("%s [%d]", COMPANIES_LIST_NAME, 0)));
assertThat(wrapper.companies.get(0).vacancyList.toString(), is(VACANCY_LIST_NAME));
}