Question: Can you help to pass the following unit test? There is an error on asserEquals test saying that MyArrayList 'data' field has incorrect type. public
Can you help to pass the following unit test? There is an error on asserEquals test saying that MyArrayList 'data' field has incorrect type.
public void testDataField
try
Objectclass is an array of the Object class. The data type in MyArrayList should also be an array of the Object class
assertEqualsObjectclass, clsgetDeclaredFielddatagetGenericType "MyArrayList 'data' field has incorrect type";
catch NoSuchFieldException e
failMyArrayList does not have field 'data'";
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
