This seemed the straightforward way to do this
Image treeItemImage = mySWTBotTreeItem.getNode("my tree item label").getImage();
However, there is no getImage method. The "widget" field in the parent AbstractSWTBot does not seem accessible.
I tried the above two things. The question "How to get Image from SWTBotTreeItem?" was posted 6 years ago, and no one has answered that. Has SWTBot been updated so it is possible to test whether the correct image is being shown in a tree item?
I found a way to do this.
Referencing the widget field adds a dependency on org.apache.log4j, so make sure that is an Import-Package in the plugin manifest.
Invoking methods of the widget field, in particular getImage(), causes thread exceptions. The following is what worked for me. The images are compared using ==, so the pair should be fetched from the same cache such as an ImageRegistry.