@Test
    public void testReserveSpot() throws Exception{
        resetSpots();
        
        AccessControlServer server = new AccessControlServer(1927);
        server.start();
        
        SpotStub spot = new SpotStub("101",1927);
        spot.start();
        
        String ans = "";
        int x = 0;
        while(x == 0){
            ans = spot.getAnswer();
            //sleep(100);
            if(ans != ""){
                
                x = 1;
            }
        }
        assertEquals(ans,"Faculty");
        
        spot.resetAnswer();
        spot.setReListen();
        
        ParkedUsers garage = ParkedUsers.getInstance();
        ParkingSpot spotRef = garage.searchBySpotNumber("101");
        
        server.reserveSpot(spotRef, "1515");
        
        ans = "";
        x = 0;
        while(x == 0){
            ans = spot.getAnswer();
            //sleep(100);
            if(ans != ""){
                
                x = 1;
            }
        }
        assertEquals("reserve",ans);
        
        spot.resetAnswer();
        spot.setReListen();
        
        ans = "";
        x = 0;
        while(x == 0){
            ans = spot.getAnswer();
            //sleep(100);
            if(ans != ""){
                
                x = 1;
            }
        }
        assertEquals("1515",ans);
        
    }