// Path: osgi.enroute.trains.rest.provider/src/osgi/enroute/trains/rest/client/TrackClient.java
// public class TrackClient {
// 	static JSONCodec codec = new JSONCodec();
// 	static TypeReference<List<Observation>> LISTOBSERVATIONS = new TypeReference<List<Observation>>() {};
// 	final URI base;
// 
// 	@Reference
// 	DTOs dtos;
// 	
// 	public TrackClient(URI base) {
// 		this.base = base;
// 	}
// 
// 	public boolean blocked(String segment, String reason, boolean blocked) throws Exception {
// 		return (Boolean) send( "blocked", segment, reason, blocked).get();
// 	}
// 	
// 	Decoder send( Object ... params ) throws Exception {
// 		StringBuilder sb = new StringBuilder();
// 		String del = base.toString();
// 		if ( !del.endsWith("/"))
// 			sb.append("/");
// 		
// 		for ( Object p : params ) {
// 			sb.append(del).append( encode(p));
// 			del = "/";
// 		}
// 		InputStream inputStream = new URL(sb.toString()).openConnection().getInputStream();
// 		return codec.dec().from(inputStream);
// 	}
// 
// 
// 	private String encode(Object blocked) throws UnsupportedEncodingException {
// 		return URLEncoder.encode( ""+blocked, "UTF-8");
// 	}
// 
// 	public List<Observation> getRecentObservations(long time) throws Exception {
// 		return send("observations", time).get(LISTOBSERVATIONS);
// 	}
// }


import java.net.URI;
import junit.framework.TestCase;
import osgi.enroute.trains.rest.client.TrackClient;
package osgi.enroute.trains.rest.provider;



/*
 * 
 * 
 * 
 */

public class RestImplTest extends TestCase {

	public void testX() throws Exception {
		TrackClient tc = new TrackClient(new URI("http://localhost:8080/rest/"));
		tc.blocked("A06", "WTF", true);
	}

	public void testY() throws Exception {
// Path: osgi.enroute.trains.rest.provider/src/osgi/enroute/trains/rest/client/TrackClient.java
// public class TrackClient {
// 	static JSONCodec codec = new JSONCodec();
// 	static TypeReference<List<Observation>> LISTOBSERVATIONS = new TypeReference<List<Observation>>() {};
// 	final URI base;
// 
// 	@Reference
// 	DTOs dtos;
// 	
// 	public TrackClient(URI base) {
// 		this.base = base;
// 	}
// 
// 	public boolean blocked(String segment, String reason, boolean blocked) throws Exception {
// 		return (Boolean) send( "blocked", segment, reason, blocked).get();
// 	}
// 	
// 	Decoder send( Object ... params ) throws Exception {
// 		StringBuilder sb = new StringBuilder();
// 		String del = base.toString();
// 		if ( !del.endsWith("/"))
// 			sb.append("/");
// 		
// 		for ( Object p : params ) {
// 			sb.append(del).append( encode(p));
// 			del = "/";
// 		}
// 		InputStream inputStream = new URL(sb.toString()).openConnection().getInputStream();
// 		return codec.dec().from(inputStream);
// 	}
// 
// 
// 	private String encode(Object blocked) throws UnsupportedEncodingException {
// 		return URLEncoder.encode( ""+blocked, "UTF-8");
// 	}
// 
// 	public List<Observation> getRecentObservations(long time) throws Exception {
// 		return send("observations", time).get(LISTOBSERVATIONS);
// 	}
// }


// Path: osgi.enroute.trains.rest.provider/test/osgi/enroute/trains/rest/provider/RestImplTest.java
import java.net.URI;
import junit.framework.TestCase;
import osgi.enroute.trains.rest.client.TrackClient;

package osgi.enroute.trains.rest.provider;



/*
 * 
 * 
 * 
 */

public class RestImplTest extends TestCase {

	public void testX() throws Exception {
		TrackClient tc = new TrackClient(new URI("http://localhost:8080/rest/"));
		tc.blocked("A06", "WTF", true);
	}

	public void testY() throws Exception {
		TrackClient tc = new TrackClient(new URI("http://localhost:8080/rest/"));