// Path: build-service/src/main/java/com/ccoe/build/service/track/Main.java
// public class Main {
//     // Base URI the Grizzly HTTP server will listen on
//     public static final String BASE_URI = "http://localhost:7070/myapp";
// 
//     /**
//      * Starts Grizzly HTTP server exposing JAX-RS resources defined in this application.
//      * @return Grizzly HTTP server.
//      */
//     public static HttpServer startServer() {
//         // create a resource config that scans for JAX-RS resources and providers
//         // in com.ccoe.build.service.health package
//         final ResourceConfig rc = new ResourceConfig().packages("com.ccoe.build.service");
// 
//         // uncomment the following line if you want to enable
//         // support for JSON on the service (you also have to uncomment
//         // dependency on jersey-media-json module in pom.xml)
//         // --
//         //rc.addBinder(org.glassfish.jersey.media.json.JsonJaxbBinder);
//         
//         rc.register(MoxyJsonFeature.class);
//         rc.register(MultiPartFeature.class);
//         rc.register(JsonMoxyConfigurationContextResolver.class);
// 
// 
//         // create and start a new instance of grizzly http server
//         // exposing the Jersey application at BASE_URI
//         return GrizzlyHttpServerFactory.createHttpServer(URI.create(BASE_URI), rc);
//     }
// 
//     /**
//      * Main method.
//      * @param args
//      * @throws IOException
//      */
//     public static void main(String[] args) throws IOException {
//         final HttpServer server = startServer();
//         System.out.println(String.format("Jersey app started with WADL available at "
//                 + "%sapplication.wadl\nHit enter to stop it...", BASE_URI));
//         
//         System.in.read();
//         server.stop();
//     }
//     
//     @Provider
//     final static class JsonMoxyConfigurationContextResolver implements ContextResolver<MoxyJsonConfiguration> {
// 
//         @Override
//         public MoxyJsonConfiguration getContext(Class<?> objectType) {
//             final MoxyJsonConfiguration configuration = new MoxyJsonConfiguration();
// 
//             Map<String, String> namespacePrefixMapper = new HashMap<String, String>(1);
//             namespacePrefixMapper.put("http://www.w3.org/2001/XMLSchema-instance", "xsi");
// 
//             configuration.setNamespacePrefixMapper(namespacePrefixMapper);
//             configuration.setNamespaceSeparator(':');
// 
//             return configuration;
//         }
//     }
// }


import javax.ws.rs.client.Client;
import javax.ws.rs.client.ClientBuilder;
import javax.ws.rs.client.WebTarget;
import org.glassfish.grizzly.http.server.HttpServer;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import com.ccoe.build.service.track.Main;
import static org.junit.Assert.assertEquals;
/*
Copyright [2013-2014] eBay Software Foundation

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

*/

package com.ccoe.build.service.track;






public class MyResourceTest {

    private HttpServer server;
    private WebTarget target;

    @Before
    public void setUp() throws Exception {
        // start the server
// Path: build-service/src/main/java/com/ccoe/build/service/track/Main.java
// public class Main {
//     // Base URI the Grizzly HTTP server will listen on
//     public static final String BASE_URI = "http://localhost:7070/myapp";
// 
//     /**
//      * Starts Grizzly HTTP server exposing JAX-RS resources defined in this application.
//      * @return Grizzly HTTP server.
//      */
//     public static HttpServer startServer() {
//         // create a resource config that scans for JAX-RS resources and providers
//         // in com.ccoe.build.service.health package
//         final ResourceConfig rc = new ResourceConfig().packages("com.ccoe.build.service");
// 
//         // uncomment the following line if you want to enable
//         // support for JSON on the service (you also have to uncomment
//         // dependency on jersey-media-json module in pom.xml)
//         // --
//         //rc.addBinder(org.glassfish.jersey.media.json.JsonJaxbBinder);
//         
//         rc.register(MoxyJsonFeature.class);
//         rc.register(MultiPartFeature.class);
//         rc.register(JsonMoxyConfigurationContextResolver.class);
// 
// 
//         // create and start a new instance of grizzly http server
//         // exposing the Jersey application at BASE_URI
//         return GrizzlyHttpServerFactory.createHttpServer(URI.create(BASE_URI), rc);
//     }
// 
//     /**
//      * Main method.
//      * @param args
//      * @throws IOException
//      */
//     public static void main(String[] args) throws IOException {
//         final HttpServer server = startServer();
//         System.out.println(String.format("Jersey app started with WADL available at "
//                 + "%sapplication.wadl\nHit enter to stop it...", BASE_URI));
//         
//         System.in.read();
//         server.stop();
//     }
//     
//     @Provider
//     final static class JsonMoxyConfigurationContextResolver implements ContextResolver<MoxyJsonConfiguration> {
// 
//         @Override
//         public MoxyJsonConfiguration getContext(Class<?> objectType) {
//             final MoxyJsonConfiguration configuration = new MoxyJsonConfiguration();
// 
//             Map<String, String> namespacePrefixMapper = new HashMap<String, String>(1);
//             namespacePrefixMapper.put("http://www.w3.org/2001/XMLSchema-instance", "xsi");
// 
//             configuration.setNamespacePrefixMapper(namespacePrefixMapper);
//             configuration.setNamespaceSeparator(':');
// 
//             return configuration;
//         }
//     }
// }


// Path: build-service/src/test/java/com/ccoe/build/service/track/MyResourceTest.java
import javax.ws.rs.client.Client;
import javax.ws.rs.client.ClientBuilder;
import javax.ws.rs.client.WebTarget;
import org.glassfish.grizzly.http.server.HttpServer;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import com.ccoe.build.service.track.Main;
import static org.junit.Assert.assertEquals;

/*
Copyright [2013-2014] eBay Software Foundation

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

*/

package com.ccoe.build.service.track;






public class MyResourceTest {

    private HttpServer server;
    private WebTarget target;

    @Before
    public void setUp() throws Exception {
        // start the server
		server = Main.startServer();