/*
 * RESTHeart - the data REST API server
 * Copyright (C) SoftInstigate Srl
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 * 
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package org.restheart.handlers.files;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert.*;

/**
 *
 * @author Maurizio Turatti <maurizio@softinstigate.com>
 */
public class GetBinaryFileHandlerTest {
    
    public GetBinaryFileHandlerTest() {
    }
    
    @BeforeClass
    public static void setUpClass() {
    }
    
    @AfterClass
    public static void tearDownClass() {
    }
    
    @Before
    public void setUp() {
    }
    
    @After
    public void tearDown() {
    }

//    @Test
//    public void testHandleRequest() throws Exception {
//        System.out.println("handleRequest");
//        HttpServerExchange exchange = null;
//        RequestContext context = null;
//        GetBinaryFileHandler instance = new GetBinaryFileHandler();
//        instance.handleRequest(exchange, context);
//        // TODO review the generated test code and remove the default call to fail.
//        fail("The test case is a prototype.");
//    }

    @Test
    public void testExtractBucket() {
        System.out.println("extractBucket");
        String expResult = "mybucket";
        String result = GetBinaryFileHandler.extractBucket("mybucket.files");
        assertEquals(expResult, result);
    }
    
}

@@ -791,116 +791,8 @@
 s;%0A%0A
-import org.junit.After;%0Aimport org.junit.AfterClass;%0Aimport org.junit.Before;%0Aimport org.junit.BeforeClass;%0A
 impo
@@ -1008,579 +1008,114 @@
   %7D%0A
-    
 %0A    @
-BeforeClass%0A    public static void setUpClass() %7B%0A    %7D%0A    %0A    @AfterClass%0A    public static void tearDownClass() %7B%0A    %7D%0A    %0A    @Before%0A    public void setUp() %7B%0A    %7D%0A    %0A    @After%0A    public void tearDown() %7B%0A    %7D%0A%0A//    @Test%0A//    public void testHandleRequest() throws Exception %7B%0A//        System.out.println(%22handleRequest%22);%0A//        HttpServerExchange exchange = null;%0A//        RequestContext context = null;%0A//        GetBinaryFileHandler instance = new GetBinaryFileHandler();%0A//        instance.handleRequest(exchange, context
+Test%0A    public void testExtractBucket() %7B%0A        System.out.println(%22testExtractBucket%22
 );%0A
-//
         
 // T
@@ -1114,297 +1114,32 @@
     
-// TODO review the generated test code and remove the default call to fail.%0A//        fail(%22The test case is a prototype.%22);%0A//    %7D%0A%0A    @Test%0A    public void testExtractBucket() %7B%0A        System.out.println(%22extractBucket%22);%0A        String expResult = %22mybucket%22;%0A        String result =
+assertEquals(%22mybucket%22,
  Get
@@ -1191,48 +1191,8 @@
 es%22)
-;%0A        assertEquals(expResult, result
 );%0A 

Remove unused code