Assume that we have some simple Java visual component, for example, rectangle. Component can change position (let it be changePosition(int x, int y) method) and color (changeColor(Color color)). How can I create unit -test for such component?
This is extremely simple situation, but, I think, it is nice illustration for my question: how we can create unit-test for any visual component in Java?
Thanks in advance