add tests; improve tests
fix usage of java8 api