@Test
	public void test_diffuse_severalDiffusions_unevenResources_shouldNotLoseResources()
	{
		int numTrials = 5;
		for (int trial = 0; trial < numTrials; trial += 1)
		{
			// Populate the world evenly with resources.
			Map<WorldResource, Integer> resourcesAtEachPosition = populateWorldWithRandomButUniformResources();
			int numPositions = world.getHeight() * world.getWidth();
			
			// Figure out how may resources in total there are in the world.
			Map<WorldResource, Long> totalResources = new HashMap<WorldResource, Long>();
			for (WorldResource r : WorldResource.getSpecificResources())
			{
				long totalCountOfResourceInWorld = numPositions * resourcesAtEachPosition.get(r);
				totalResources.put(r, totalCountOfResourceInWorld);
			}
	//		for (int x = world.getMinX(); x <= world.getMaxX(); x += 1)
	//		{
	//			for (int y = world.getMinY(); y <= world.getMaxY(); y += 1)
	//			{
	//				for (WorldResource resource : WorldResource.getSpecificResources())
	//				{
	//					totalResources.put(resource, world.getMutableResourceCollectionAtPosition(x, y).getResourceCount(resource) + totalResources.get(resource));
	//				}
	//			}
	//		}
			
			// Add resources to the world at random locations.
			Random r = new Random();
			for (WorldResource resourceType : WorldResource.getSpecificResources())
			{
				// Get a random location.
				int x = r.nextInt(world.getWidth()) + world.getMinX();
				int y = r.nextInt(world.getHeight()) + world.getMinY();
				
				// Determine how many resources to add.
				final int MAX_RESOURCES_TO_ADD = 400, MIN_RESOURCES_TO_ADD = 100;
				int resourcesAdded = r.nextInt(MAX_RESOURCES_TO_ADD - MIN_RESOURCES_TO_ADD) + MIN_RESOURCES_TO_ADD;
				
				// Add the resources.
				world.getMutableResourceCollectionAtPosition(x, y).depositResources(resourceType, resourcesAdded);
				
				// Record the resources that we just added in our "grand total."
				totalResources.put(resourceType, totalResources.get(resourceType) + resourcesAdded);
			}
			
			// Diffuse a bunch of times.
			final int NUM_DIFFUSIONS = 20;
			for (int i = 0; i < NUM_DIFFUSIONS; i += 1)
			{
				world.diffuse();
			}
			
			// Ensure that no resources were lost nor gained during diffusion.
			Map<WorldResource, Long> totalResourcesAfterDiffusion = new HashMap<WorldResource, Long>();
			for (WorldResource resource : WorldResource.getSpecificResources())
			{
				totalResourcesAfterDiffusion.put(resource, 0L);
			}
			for (int x = world.getMinX(); x <= world.getMaxX(); x += 1)
			{
				for (int y = world.getMinY(); y <= world.getMaxY(); y += 1)
				{
					for (WorldResource resource : WorldResource.getSpecificResources())
					{
						totalResourcesAfterDiffusion.put(resource, 
								world.getMutableResourceCollectionAtPosition(x, y).getResourceCount(resource) + totalResourcesAfterDiffusion.get(resource));
					}
				}
			}
			for (WorldResource resource : WorldResource.getSpecificResources())
			{
				assertEquals(
						"Amount of resource type ["+resource+"] after diffusion is incorrect.",
						totalResources.get(resource),
						totalResourcesAfterDiffusion.get(resource));
			}
		}
	}