	@Test
	public void testGetExtensionBytesEnableAllBits() throws Exception {

		ConnectionDegradation connectionDegradationMock = mock(ConnectionDegradation.class);
		PhaseRegulator phaseRegulatorMock = mock(PhaseRegulator.class);
		ScheduledExecutorService executorServiceMock = mock(ScheduledExecutorService.class);
		IPeerConnector peerConnectorMock = mock(IPeerConnector.class);
		IPeerDistributor peerDistributorMock = mock(IPeerDistributor.class);
		IRequestLimiter requestLimiter = mock(IRequestLimiter.class);

		TorrentClient.Builder builder = new TorrentClient.Builder()
				.setConnectionDegradation(connectionDegradationMock)
				.setPhaseRegulator(phaseRegulatorMock)
				.setExecutorService(executorServiceMock)
				.setRequestLimiter(requestLimiter)
				.setPeerConnector((t) -> peerConnectorMock)
				.setPeerDistributor(tc -> peerDistributorMock)
				.registerTrackerProtocol("udp", (url, client) -> null);

		// There are 8 extension bytes, enable them all
		for (int i = 0; i < 64; i++) {
			builder.enableExtensionBit(i);
		}

		byte[] extensionBytes = builder.build().getExtensionBytes();

		verify(peerConnectorMock).start();

		byte[] whenedBytes = {
				(byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
				(byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF
		};
		assertEquals(8, (Object) extensionBytes.length, "Incorrect amount of extension byes");
		assertArrayEquals(whenedBytes, extensionBytes, "Extension bit didn't get enabled correctly");
	}