Map and FlatMap operator tests for the new Java API

See issue #548