@Test public void shouldGetEntry() throws Exception { Abdera localAbdera = new Abdera(); when(jdbcTemplate.query(any(String.class), any(Object[].class), any(EntryRowMapper.class))) .thenReturn(entryList); when(getEntryRequest.getAbdera()).thenReturn(localAbdera); assertEquals( "Should get a 200 response", HttpStatus.OK, postgresFeedSource.getEntry(getEntryRequest).getResponseStatus()); }