while it would compile it would throw an exception as the enumeration returned could not be proxied (sub-classed), simply because all enums are final.
In reality we should not attempt to sub-class the enum as it's value is final and hence we can return it directly. ie: as the value is immutable, it isn't going to change and thus a proxy of it wouldn't change either. The solution is to treat them just like we treat other immutable final objects (eg: Strings) and return a dummy value.
During testing it was discovered (by Tim Middleton) that it's not easy to use an enumeration with an Eventually.assertThat(). eg:
while it would compile it would throw an exception as the enumeration returned could not be proxied (sub-classed), simply because all enums are final.
In reality we should not attempt to sub-class the enum as it's value is final and hence we can return it directly. ie: as the value is immutable, it isn't going to change and thus a proxy of it wouldn't change either. The solution is to treat them just like we treat other immutable final objects (eg: Strings) and return a dummy value.