@SuppressWarnings("unchecked")
@Test
public void testGetContracts() {

	when(contactDao.list(any(ContactQuery.class), anyMap())).thenReturn(Collections.singletonList(contactRef));
	List<ContactDto> res = webservice.getContracts(2, 1);
	verify(contactDao).list(argThat(new BaseMatcher<ContactQuery>() {
		@Override
		public boolean matches(Object arg0) {
			return arg0 != null && (arg0 instanceof ContactQuery) && ((ContactQuery) arg0).getFirstResult() == 2
					&& ((ContactQuery) arg0).getMaxResults() == 1;
		}
		@Override
		public void describeTo(Description arg0) {
			arg0.appendText("ContactQuery 2-1");
		}
	}), anyMap());
	assertEquals(1, res.size());
	assertEquals("Hans Hummel", res.get(0).getName());
	assertEquals(0, res.get(0).getHistory().size());
}