@Test
public void testGetTile()
                        throws UnknownCRSException {

    GeometryFactory fac = new GeometryFactory();
    ICRS crs = CRSManager.lookup( "EPSG:4326" );
    Envelope env = fac.createEnvelope( -10, -10, 10, 10, crs );
    SpatialMetadata smd = new SpatialMetadata( env, Collections.singletonList( crs ) );
    TileMatrix md = new TileMatrix( "someid", smd, 256, 256, 1, 1, 1 );
    TileDataLevel tm = mock( TileDataLevel.class );
    Tile t = mock( Tile.class );
    tm.getMetadata();
    tm.getTile( 0, 0 );
    when( tm.getMetadata() ).thenReturn( md );
    when( tm.getTile( 0, 0 ) ).thenReturn( t );
    assertEquals( 256, tm.getMetadata().getTilePixelsX() );
    verify( tm ).getTile( 0, 0 );
}