@Test(expected = IllegalArgumentException.class) public void testAddIncludedWithDifferentTypeThrowsIllegalArgumentException() { setUpExpectations(); JsonApiIdentifiable minimalEntity = createMinimalEntity(); JsonApiIdentifiable relatedEntity = createCustomMinimalEntity(TEST_ID); JsonApiIdentifiable unrelatedEntity = createEntityWithAttributes(); JsonApiResponse .createGetResponse(uriInfo) .data(minimalEntity) .addRelationship("related", relatedEntity, uriInfo.getAbsolutePath()) .addIncluded(unrelatedEntity) .build(); }
public static RequiredEntity createGetResponse(UriInfo uriInfo) { Assert.assertNotNull(uriInfo); return new Builder(new JsonApiResponse(uriInfo, Response.Status.OK)); }
JsonApiResponse { public static RequiredEntity createGetResponse(UriInfo uriInfo) { Assert.assertNotNull(uriInfo); return new Builder(new JsonApiResponse(uriInfo, Response.Status.OK)); } }
JsonApiResponse { public static RequiredEntity createGetResponse(UriInfo uriInfo) { Assert.assertNotNull(uriInfo); return new Builder(new JsonApiResponse(uriInfo, Response.Status.OK)); } private  JsonApiResponse(UriInfo uriInfo, Response.StatusType statusCode); private  JsonApiResponse(Response.StatusType statusCode); }
JsonApiResponse { public static RequiredEntity createGetResponse(UriInfo uriInfo) { Assert.assertNotNull(uriInfo); return new Builder(new JsonApiResponse(uriInfo, Response.Status.OK)); } private  JsonApiResponse(UriInfo uriInfo, Response.StatusType statusCode); private  JsonApiResponse(Response.StatusType statusCode); static RequiredEntity createGetResponse(UriInfo uriInfo); static RequiredEntity createPostResponse(UriInfo uriInfo); static RequiredEntity createPutResponse(UriInfo uriInfo); static BuildableException createExceptionResponse(Response.Status code); }
JsonApiResponse { public static RequiredEntity createGetResponse(UriInfo uriInfo) { Assert.assertNotNull(uriInfo); return new Builder(new JsonApiResponse(uriInfo, Response.Status.OK)); } private  JsonApiResponse(UriInfo uriInfo, Response.StatusType statusCode); private  JsonApiResponse(Response.StatusType statusCode); static RequiredEntity createGetResponse(UriInfo uriInfo); static RequiredEntity createPostResponse(UriInfo uriInfo); static RequiredEntity createPutResponse(UriInfo uriInfo); static BuildableException createExceptionResponse(Response.Status code); static final String JSONAPI_TYPE; }