In my test case, I have a java.util.List
annotated with @Field
so as to make use of it in teardown methods. It contains the POJOs that represent the test data. It’s declared like such:
@Field List expectedStates = Arrays.asList([])
I get UnsupportedOperationException
on the following line:
expectedStates.add(newItem)
Why is this exception throwing? newItem
is ItemData
I literally get this exception: Test Cases/AddValidItems FAILED because (of) java.lang.UnsupportedOperationException