LgoAdapters { public static Stream<LgoKey> adaptKeysIndex(String indexFile) { String[] all = indexFile.split("(true|false)"); Spliterator<String> spliterator = Spliterators.spliterator(all, Spliterator.IMMUTABLE | Spliterator.NONNULL); return StreamSupport.stream(spliterator, true).map(LgoAdapters::parseSummary); } private  LgoAdapters(); static ExchangeMetaData adaptMetadata(
      ExchangeMetaData metaData, LgoProducts products, LgoCurrencies currencies); static Stream<LgoKey> adaptKeysIndex(String indexFile); static LgoPlaceOrder adaptLimitOrder(LimitOrder limitOrder); static LgoPlaceOrder adaptEncryptedMarketOrder(MarketOrder marketOrder); static LgoPlaceOrder adaptEncryptedCancelOrder(String orderId, Date date); static LgoUnencryptedOrder adaptUnencryptedLimitOrder(LimitOrder limitOrder); static LgoUnencryptedOrder adaptUnencryptedMarketOrder(MarketOrder marketOrder); static String adaptCurrencyPair(CurrencyPair currencyPair); static UserTrades adaptUserTrades(WithCursor<LgoUserTrades> lastTrades); static OrderBook adaptOrderBook(LgoOrderbook ob, CurrencyPair pair); static LimitOrder adaptEntryToLimitOrder(
      Object[] entry, OrderType bid, CurrencyPair pair); static String adaptDateParam(Date date);  }
@Test public void adaptsKeysIndex() throws IOException { InputStream is = LgoAdaptersTest.class.getResourceAsStream("/org/knowm/xchange/lgo/key/index.txt"); String indexFile = IOUtils.toString(is, StandardCharsets.US_ASCII); List<LgoKey> keys = LgoAdapters.adaptKeysIndex(indexFile).collect(Collectors.toList()); assertThat(keys).hasSize(2); assertThat(keys.get(0)) .isEqualToComparingFieldByField( new LgoKey( "7b5dd30f-47cc-4c72-938b-199b13bc6f72", Instant.parse("2019-07-16T09:13:54Z"), Instant.parse("2019-07-16T10:13:54Z"))); assertThat(keys.get(1)) .isEqualToComparingFieldByField( new LgoKey( "684700ae-8bc7-4315-8aec-b69ca778339a", Instant.parse("2019-07-16T10:03:54Z"), Instant.parse("2019-07-16T11:03:54Z"))); }