My question is very similar to another one already solved.
I have to display a moving entity along with its path in ICRF. I previously had it working using CZML. But now I am replacing the CZML objects to entities. To configurate the entity's position I am using SampledPositionProperty and setting the reference frame in the constructor. The displayed result seems to be Earth fixed because the path looks like a spiral instead of an ellipse.
new SampledPositionProperty(ReferenceFrame.INERTIAL);
The shape of the path comes from the coordinates passed into the SampledPositionProperty.
You need to make sure the coordinates you're passing in have already been transformed into ICRF coordinates, forming an ellipse, not the Earth-fixed coordinates in the shape of a spiral.
Cesium will simply draw whatever shape you give it. The choice of reference frame on the SampledPositionProperty constructor there only controls whether your shape will be fixed to the Earth, or aligned to the ICRF frame over time, but it doesn't change the actual shape. So if you give it a spiral path, it will show you a spiral path. The conversion between coordinate systems is up to you (but can be done using Cesium helper functions, if needed).