@Test public void getLists() throws Exception { HubSpotListLists hsll = connector.getContactsLists(USER_ID, null, null); String listID = null; for (final HubSpotList hsl : hsll.getLists()) { if (hsl != null && !hsl.getDeleted()) { listID = hsl.getListId(); break; } } if (listID == null) { throw new Exception( "It must be one List not deleted in the sandbox to complete the test case"); } Assert.assertNotNull(hsll); Assert.assertTrue(hsll.getLists().size() >= 0); final HubSpotList hsl = connector.getContactListById(USER_ID, listID); Assert.assertNotNull(hsl); hsll = connector.getDynamicContactLists(USER_ID, null, null); Assert.assertNotNull(hsll); Assert.assertTrue(hsll.getLists().size() > 1); final ContactList cl = connector.getContactsInAList(USER_ID, listID, null, null, null); Assert.assertNotNull(cl); }