@Test
	public void testTrafficLightTimeServer() {
		try{
			new TrafficLight(null);
		} catch (IllegalArgumentException e){
			assertTrue(true);
		}
		try{
			new TrafficLight(time);
			assertTrue(true);
		} catch (IllegalArgumentException e){
			assertTrue(false);
		}
		//initial state should be green
		assertEquals(light1.getCurrentState(), light1.getGreenState());
		//check the green light time
		for(int i = 0; i < 500; i++ ){
			light1 = new TrafficLight(time);
			if(light1.getGreenTime() >= TrafficLightSettings.GREEN_MIN.value()
				&& light1.getGreenTime() <= TrafficLightSettings.GREEN_MAX.value())
				assertTrue(true);
			else
				assertTrue(false);
			//System.out.println(light1.getGreenTime());
		}
		
		//check the yellow light time
		for(int i = 0; i < 500; i++ ){
			light1 = new TrafficLight(time);
			if(light1.getYellowTime() >= TrafficLightSettings.YELLOW_MIN.value()
				&& light1.getYellowTime() <= TrafficLightSettings.YELLOW_MAX.value())
				assertTrue(true);
			else
				assertTrue(false);
			//System.out.println(light1.getYellowTime());
		}
	}