Replace scala category integration test by a Java implementation.