@Test
public void testSetTileSource() {

    NicTileSource oldTileSource = mock(NicTileSource.class);
    when(oldTileSource.getMaximumZoomLevel()).thenReturn(7);
    NicTileSource newTileSource = mock(NicTileSource.class);
    when(newTileSource.getMaximumZoomLevel()).thenReturn(42);
    // Only required by the super-constructor:
    IRegisterReceiver registerReceiver = mock(IRegisterReceiver.class);
    AssetTileProvider atp = new AssetTileProvider(registerReceiver, oldTileSource, null);
    assertEquals(atp.getMaximumZoomLevel(), 7);
    atp.setTileSource(newTileSource);
    assertEquals(atp.getMaximumZoomLevel(), 42);
}