001    package org.hackystat.sensorbase.resource.db;
002    
003    import org.hackystat.sensorbase.client.SensorBaseClient;
004    import org.hackystat.sensorbase.test.SensorBaseRestApiHelper;
005    import org.junit.Test;
006    
007    /**
008     * Tests the Index REST API.
009     * 
010     * @author Philip Johnson
011     */
012    public class TestIndexRestApi extends SensorBaseRestApiHelper {
013    
014      /**
015       * Test that PUT {host}/db/index runs the index method. 
016       * 
017       * @throws Exception If problems occur.
018       */
019      @Test
020      public void testIndex() throws Exception { //NOPMD
021        SensorBaseClient client = new SensorBaseClient(getHostName(), adminEmail, adminPassword);
022        client.authenticate();
023        client.setTimeout(200000);
024        client.indexTables();
025      }
026    }