code: public static Map<String, String> getResponseHeaders(Object entity, ODataUri oDataUri,
                                                           EntityDataModel entityDataModel) throws ODataEdmException {
  
          final Map<String, String> headers = new HashMap<>();
          headers.put(LOCATION, String.format("%s/%s(%s)", oDataUri.serviceRoot(),
                  getEntitySetByEntity(entityDataModel, entity).getName(),
                  formatEntityKey(entityDataModel, entity)));
          return headers;
      }
docs: Get the response headers when the response is to include an entity in its body.
  
  @param entity The entity that will be included in the body of the response.
  @return The response headers.
  @throws com.sdl.odata.api.edm.ODataEdmException In case it is not possible to build the headers.