### Question:
AskOrderServiceImpl implements OrderService<AskOrder, ColoredCoinsAskOrderPlacement> { @Override public Stream<AskOrder> getOrdersByAccount(long accountId, int from, int to) { return converter.convert( askOrderTable.getManyBy( new DbClause.LongClause("account_id", accountId), from, to ) ); } AskOrderServiceImpl(
        final DatabaseManager databaseManager,
        final AskOrderTable orderAskTable,
        final Blockchain blockchain,
        final IteratorToStreamConverter<AskOrder> converter
    ); @Inject  AskOrderServiceImpl(
        final DatabaseManager databaseManager,
        final AskOrderTable orderAskTable,
        final Blockchain blockchain
    ); @Override int getCount(); @Override AskOrder getOrder(long orderId); @Override Stream<AskOrder> getAll(int from, int to); @Override Stream<AskOrder> getOrdersByAccount(long accountId, int from, int to); @Override Stream<AskOrder> getOrdersByAccountAsset(final long accountId, final long assetId, int from, int to); @Override Stream<AskOrder> getSortedOrders(long assetId, int from, int to); @Override AskOrder getNextOrder(long assetId); @Override void addOrder(Transaction transaction, ColoredCoinsAskOrderPlacement attachment); @Override void removeOrder(long orderId); @Override void updateQuantityATU(long quantityATU, AskOrder orderAsk);  }### Answer:
@Test void shouldGetOrdersByAccount() { final long accountId = 5L; final AskOrder order = mock(AskOrder.class); int from = 0; int to = 100; @SuppressWarnings("unchecked") final DbIterator<AskOrder> dbIterator = mock(DbIterator.class); when(askOrderTable.getManyBy(any(DbClause.LongClause.class), eq(from), eq(to))).thenReturn(dbIterator); final Stream<AskOrder> streamExpected = Stream.of(order); when(converter.convert(dbIterator)).thenReturn(streamExpected); final Stream<AskOrder> streamActual = orderService.getOrdersByAccount(accountId, from, to); assertEquals(streamExpected, streamActual); }