### Question:
Vacancy { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Vacancy vacancy = (Vacancy) o; return Objects.equals(text, vacancy.text) && Objects.equals(url, vacancy.url) && Objects.equals(date, vacancy.date); } Vacancy();  Vacancy(String text, String url, Calendar date); @Override boolean equals(Object o); @Override int hashCode(); boolean isFull(); String getText(); void setText(String text); String getUrl(); void setUrl(String url); Calendar getDate(); void setDate(Calendar date);  }### Answer:
@Test public void ifVacancyAreEqualsThenEqualsShouldBeReturnTrue() { Vacancy first = new Vacancy("test", "test", new GregorianCalendar(0, 0, 0)); Vacancy second = new Vacancy("test", "test", new GregorianCalendar(0, 0, 0)); assertThat(first.equals(second), is(true)); assertThat(second.equals(first), is(true)); }
@Test public void ifVacancyDifferenceThenEqualsShouldBeReturnFalse() { Vacancy first = new Vacancy("test", "test", new GregorianCalendar(0, 0, 0)); Vacancy second = new Vacancy("test", "tes", new GregorianCalendar(1, 0, 0)); assertThat(first.equals(second), is(false)); assertThat(second.equals(first), is(false)); }