@Test
	public void layerIteratorTest() {
		int traversed = 0;
		int backtracked = 0;
		LayerIterator iter = new LayerIterator(networkLinear);
		while (iter.hasNext()) {
			List<? extends Neuron> layer = iter.next();
			assertNotNull(layer);
			if (iter.hasPrevious()) {
				iter.previous();
				assertEquals(layer, iter.next());
				backtracked++;
			}
			traversed++;
		}
		assertEquals(3, traversed);
		assertEquals(2, backtracked);
		iter = new LayerIterator(networkLinear);
		traversed = 0;
		backtracked = 0;
		while (iter.hasPrevious()) {
			List<? extends Neuron> layer = iter.previous();
			assertNotNull(layer);
			if (iter.hasNext()) {
				iter.next();
				assertEquals(layer, iter.previous());
				backtracked++;
			}
			traversed++;
		}
		assertEquals(3, traversed);
		assertEquals(2, backtracked);
	}