### Question:
SecretLockSearchCriteria extends SearchCriteria<SecretLockSearchCriteria> { public Address getAddress() { return address; } SecretLockSearchCriteria(Address address); Address getAddress(); @Override boolean equals(Object o); @Override int hashCode();  }### Answer:
@Test void shouldCreate() { SecretLockSearchCriteria criteria = new SecretLockSearchCriteria(account1.getAddress()); Assertions.assertNull(criteria.getOrder()); Assertions.assertNull(criteria.getPageSize()); Assertions.assertNull(criteria.getPageNumber()); Assertions.assertNull(criteria.getOffset()); Assertions.assertEquals(account1.getAddress(), criteria.getAddress()); }
@Test void shouldSetValues() { SecretLockSearchCriteria criteria = new SecretLockSearchCriteria(account1.getAddress()); criteria.setOrder(OrderBy.DESC); criteria.setPageSize(10); criteria.setPageNumber(5); criteria.setOffset("abc"); Assertions.assertEquals(account1.getAddress(), criteria.getAddress()); Assertions.assertEquals(OrderBy.DESC, criteria.getOrder()); Assertions.assertEquals(10, criteria.getPageSize()); Assertions.assertEquals(5, criteria.getPageNumber()); Assertions.assertEquals("abc", criteria.getOffset()); }
@Test void shouldUseBuilderMethods() { SecretLockSearchCriteria criteria = new SecretLockSearchCriteria(account1.getAddress()) .order(OrderBy.ASC) .pageSize(10) .pageNumber(5); criteria.offset("abc"); Assertions.assertEquals(OrderBy.ASC, criteria.getOrder()); Assertions.assertEquals(10, criteria.getPageSize()); Assertions.assertEquals(5, criteria.getPageNumber()); Assertions.assertEquals("abc", criteria.getOffset()); Assertions.assertEquals(account1.getAddress(), criteria.getAddress()); }