Connect { public List<Data> getData() throws ConnectException { final InputStream inputStream; try { inputStream = mRequestBuilder.create().connect().getInputStream(); return mParser.getModels(inputStream); } catch (IOException e) { throw new ConnectException(new DeliveryException(e)); } } Connect(String url);   Connect(RequestBuilder requestBuilder, Parser parser); List<Data> getData();  }
@Test public void shouldReturnEmptyList() throws ConnectException { assertEquals(Collections.EMPTY_LIST, new Connect(mRequestBuilder, mParser).getData()); }
@Test public void shouldIntegrateParser() throws ConnectException { Connect connect = new Connect(mRequestBuilder, mParser); connect.getData(); verify(mParser, times(1)).getModels(mInputStream); }