From the OGC GeoPackage Specification :
The tile coordinate (0,0) always refers to the tile in the upper left corner of the tile matrix at any zoom level, regardless of the actual availability of that tile
The GeoTools GeoPackage mosaic test data appears to have been generated using the GeoServer GeoPackage output format, and is invalid (tile order inverted along y-axis, such that the tile coordinate (0,0) is actually the lower left corner).
Consequently, if you try to load a valid GeoPackage into GeoServer (such as https://portal.opengeospatial.org/files/?artifact_id=73648 ), you will get invalid (tile order inverted along y-axis) WMS output when requesting a regular (png) getMap request.
Similarly, if you use WMS to generate a GeoPackage file from any layer, the tile order will be inverted along the y-axis (See GEOS-8112 Resolved ).