when(segment.getNavigationProperty()).thenReturn(navigationProperty);
ArrayList<NavigationPropertySegment> segments = new ArrayList<NavigationPropertySegment>();
segments.add(segment);
expand.add(segments);
when(uriInfo.getExpand()).thenReturn(expand);
SelectItem select1 = mock(SelectItem.class);
SelectItem select2 = mock(SelectItem.class);
EdmProperty property = mock(EdmProperty.class);
when(property.getName()).thenReturn("property");
when(select1.getProperty()).thenReturn(property);
when(select2.getProperty()).thenReturn(property);
when(select2.getNavigationPropertySegments()).thenReturn(segments);
when(uriInfo.getSelect()).thenReturn(Arrays.asList(select1, select2));
final ODataResponse response =
new ODataDebugResponseWrapper(context, wrappedResponse, uriInfo, null,
ODataDebugResponseWrapper.ODATA_DEBUG_JSON)