Ray Milkey

Set the location string correctly for intent POST operations

Change-Id: I7ddb98ca1c5e87fc0fe34c79c5499047e599191f
......@@ -152,7 +152,7 @@ public class IntentsWebResource extends AbstractWebResource {
service.submit(intent);
UriBuilder locationBuilder = uriInfo.getBaseUriBuilder()
.path("intents")
.path(Short.toString(intent.appId().id()))
.path(intent.appId().name())
.path(Long.toString(intent.id().fingerprint()));
return Response
.created(locationBuilder.build())
......
......@@ -400,7 +400,7 @@ public class IntentsResourceTest extends ResourceTest {
.post(ClientResponse.class, jsonStream);
assertThat(response.getStatus(), is(HttpURLConnection.HTTP_CREATED));
String location = response.getLocation().getPath();
assertThat(location, Matchers.startsWith("/intents/2/"));
assertThat(location, Matchers.startsWith("/intents/myApp/"));
}
/**
......