rewrite the room class utilizing the Test case for the room
import static org.junit.Assert.\*;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

/\*\*
 \* The test class RoomTest.
 \*
 \* @author (your name)
 \* @version (a version number or a date)
 \*/
public class RoomTest
{
 private Device ceilingF1;
 private Device standingF1;
 
 private Device aC1;
 private Room room1;

 Room room4 = new Room(25);
 Room room = new Room(30);
 Room room2 = new Room(35);
 Room room3 = new Room(37);
 /\*\*
 \* Default constructor for test class RoomTest
 \*/
 public RoomTest()
 {
 }

 /\*\*
 \* Sets up the test fixture.
 \*
 \* Called before every test case method.
 \*/
 @Before
 public void setUp()
 {
 ceilingF1 = new CeilingFan();
 standingF1 = new StandingFan();
 aC1 = new AC();
 room1 = new Room(30);
 }

 /\*\*
 \* Tears down the test fixture.
 \*
 \* Called after every test case method.
 \*/
 @After
 public void tearDown()
 {
 }

 @Test
 public void testDeviceArrayList(){
 java.util.ArrayList devices =room1.getDevices();
 assertNotNull(devices); 
 }
 @Test
 public void testAddDevices(){
 room1.addDevice(ceilingF1);
 room1.addDevice(aC1);
 room1.addDevice(standingF1);
 java.util.ArrayList devices =room1.getDevices();
 assertEquals(3,devices.size());
 
 }
 @Test
 public void testRemoveDevices(){
 room1.addDevice(ceilingF1);
 room1.addDevice(aC1);
 room1.addDevice(standingF1);
 assertFalse(room1.removeDevice(ceilingF1));
 assertFalse(room1.removeDevice(aC1));
 assertTrue(room1.removeDevice(standingF1));
 java.util.ArrayList devices =room1.getDevices();
 assertEquals(2,devices.size());
 
 }
 @Test
 public void testGetDevices()
 {
 room1.addDevice(ceilingF1); 
 room1.addDevice(aC1);
 room1.addDevice(standingF1);
 java.util.ArrayList devices = room1.getDevices();
 for(Device d: devices){
 if(d instanceof AC){
 assertEquals(0,d.getBreeziness());
 assertEquals(0,d.getNoisiness());
 }
 if(d instanceof CeilingFan){
 assertEquals(2,d.getBreeziness());
 System.out.println(d.toString());
 assertEquals(0,d.getNoisiness()); 
 }
 if(d instanceof StandingFan){
 assertEquals(2,d.getBreeziness());
 assertEquals(2,d.getNoisiness()); 
 }
 }
 }
 @Test
 public void testRoomBreeziness()
 {
 room1.addDevice(ceilingF1);
 room1.addDevice(aC1);
 room1.addDevice(standingF1);
 assertEquals(room1.getBreeziness(), 0);
 standingF1.turnOn();
 assertEquals(room1.getBreeziness(), 2);
 ceilingF1.turnOn();
 assertEquals(room1.getBreeziness(), 4);
 aC1.turnOn();
 assertEquals(room1.getBreeziness(), 4);
 }
 
 @Test
 public void testRoomNoisiness()
 {
 room1.addDevice(ceilingF1);
 room1.addDevice(aC1);
 room1.addDevice(standingF1);
 assertEquals(room1.getNoisiness(), 0);
 standingF1.turnOn();
 assertEquals(room1.getNoisiness(), 2);
 ceilingF1.turnOn();
 assertEquals(room1.getNoisiness(), 2);
 aC1.turnOn();
 assertEquals(room1.getNoisiness(), 2);
 }
 @Test
 public void testTemperatureDrop()
 {
 room1.addDevice(ceilingF1);
 room1.addDevice(aC1);
 room1.addDevice(standingF1);
 assertEquals(room1.getTemperatureDrop(), 0);
 standingF1.turnOn();
 assertEquals(room1.getTemperatureDrop(), 1);
 ceilingF1.turnOn();
 assertEquals(room1.getTemperatureDrop(), 4);
 aC1.turnOn();
 assertEquals(room1.getTemperatureDrop(), 9);
 }
 @Test
 public void testTemperatureRise()
 {
 room1.addDevice(ceilingF1);
 room1.addDevice(aC1);
 room1.addDevice(standingF1);
 standingF1.turnOn();
 ceilingF1.turnOn(); 
 aC1.turnOn();
 assertEquals(room1.getTemperatureDrop(), 9);
 aC1.turnOff();
 assertEquals(room1.getTemperatureDrop(), 4);
 ceilingF1.turnOff();
 assertEquals(room1.getTemperatureDrop(), 1);
 standingF1.turnOff();
 assertEquals(room1.getTemperatureDrop(), 0);
 }
 @Test
 public void testTemperatureRiseAndFall()
 {
 room1.addDevice(ceilingF1);
 room1.addDevice(aC1);
 room1.addDevice(standingF1);
 standingF1.turnOn();
 ceilingF1.turnOn(); 
 assertEquals(room1.getTemperatureDrop(), 4); 
 ceilingF1.turnOff();
 assertEquals(room1.getTemperatureDrop(), 1);
 aC1.turnOn();
 assertEquals(room1.getTemperatureDrop(), 6);
 aC1.turnOff();
 standingF1.turnOff();
 assertEquals(room1.getTemperatureDrop(), 0);
 }
}
방에 대한 테스트 케이스를 사용하여 방 클래스를 다시 작성합니다.정적 org.junit.Assert.\*를 임포트합니다;import org.junit.After;import org.junit.Before;import org.junit.Test;/\*\* \* 테스트 클래스 RoomTest. \* \* @author (사용자 이름) \* @version (버전 번호 또는 날짜) \*/공용 클래스 RoomTest{ private Device ceilingF1; private Device standingF1;  private Device aC1; private Room room1; 방 room4 = 새로운 방(25); 방 방 = 새로운 방(30); 방 room2 = 새로운 방(35); 방 room3 = 새로운 방(37); /\*\* \* 테스트 클래스 RoomTest의 디폴트 생성자 \*/ public RoomTest() { } /\*\* \* 테스트 픽스처를 설정합니다. \* \* 모든 테스트 케이스 메서드 앞에 호출됩니다. \*/ @Before public void setUp() { ceilingF1 = new CeilingFan(); standingF1 = 새로운 스탠딩팬(); aC1 = new AC(); room1 = new Room(30); } /\*\* \* 테스트 픽스처를 분해합니다. \* \* 모든 테스트 케이스 메서드 뒤에 호출됩니다. \*/ @After public void tearDown() { } @Test public void testDeviceArrayList(){{ java.util.ArrayList devices =room1.getDevices(); assertNotNull(devices);  } @Test public void testAddDevices(){ room1.addDevice(ceilingF1); room1.addDevice(aC1); room1.addDevice(standingF1); java.util.ArrayList devices = room1.getDevices(); assertEquals(3,devices.size());  } @Test public void testRemoveDevices(){{ room1.addDevice(ceilingF1); room1.addDevice(aC1); room1.addDevice(standingF1); assertFalse(room1.removeDevice(ceilingF1)); assertFalse(room1.removeDevice(aC1)); assertTrue(room1.removeDevice(standingF1)); java.util.ArrayList devices = room1.getDevices(); assertEquals(2,devices.size());  } @Test public void testGetDevices() { room1.addDevice(ceilingF1);  room1.addDevice(aC1); room1.addDevice(standingF1); java.util.ArrayList devices = room1.getDevices(); for(Device d: devices){ if(d instanceof AC){ assertEquals(0,d.getBreeziness()); assertEquals(0,d.getNoisiness()); } if(d instanceof CeilingFan){ assertEquals(2,d.getBreeziness()); System.out.println(d.toString()); assertEquals(0,d.getNoisiness());  } if(d instanceof StandingFan){ assertEquals(2,d.getBreeziness()); assertEquals(2,d.getNoisiness());  } } } @Test public void testRoomBreeziness() { room1.addDevice(ceilingF1); room1.addDevice(aC1); room1.addDevice(standingF1); assertEquals(room1.getBreeziness(), 0); standingF1.turnOn(); assertEquals(room1.getBreeziness(), 2); ceilingF1.turnOn(); assertEquals(room1.getBreeziness(), 4); aC1.turnOn(); assertEquals(room1.getBreeziness(), 4); }  @Test public void testRoomNoisiness() { room1.addDevice(ceilingF1); room1.addDevice(aC1); room1.addDevice(standingF1); assertEquals(room1.getNoisiness(), 0); standingF1.turnOn(); assertEquals(room1.getNoisiness(), 2); ceilingF1.turnOn(); assertEquals(room1.getNoisiness(), 2); aC1.turnOn(); assertEquals(room1.getNoisiness(), 2); } @Test public void testTemperatureDrop() { room1.addDevice(ceilingF1); room1.addDevice(aC1); room1.addDevice(standingF1); assertEquals(room1.getTemperatureDrop(), 0); standingF1.turnOn(); assertEquals(room1.getTemperatureDrop(), 1); ceilingF1.turnOn(); assertEquals(room1.getTemperatureDrop(), 4); aC1.turnOn(); assertEquals(room1.getTemperatureDrop(), 9); } @Test public void testTemperatureRise() { room1.addDevice(ceilingF1); room1.addDevice(aC1); room1.addDevice(standingF1); standingF1.turnOn(); ceilingF1.turnOn();  aC1.turnOn(); assertEquals(room1.getTemperatureDrop(), 9); aC1.turnOff(); assertEquals(room1.getTemperatureDrop(), 4); ceilingF1.turnOff(); assertEquals(room1.getTemperatureDrop(), 1); standingF1.turnOff(); assertEquals(room1.getTemperatureDrop(), 0); } @Test public void testTemperatureRiseAndFall() { room1.addDevice(ceilingF1); room1.addDevice(aC1); room1.addDevice(standingF1); standingF1.turnOn(); ceilingF1.turnOn();  assertEquals(room1.getTemperatureDrop(), 4);  ceilingF1.turnOff(); assertEquals(room1.getTemperatureDrop(), 1); aC1.turnOn(); assertEquals(room1.getTemperatureDrop(), 6); aC1.turnOff(); standingF1.turnOff(); assertEquals(room1.getTemperatureDrop(), 0); }}