I need to do unit test of PlanilhaReader
but this extends ArrayList<String>
and I override the contains method. Is there any way to run it?
@Component
public class PlanilhaReader extends ArrayList<String> {
final String UPLOAD_PATH = PropertiesSingleton.getValue("api.upload.dir");
@Override
public boolean contains(Object o) {
String paramStr = (String)o;
for (String s : this) {
if (paramStr.equalsIgnoreCase(s)) return true;
}
return false;
}
public BasicDBList readMetadados(Planilha planilha) {...}
}
Test
public class PlanilhaReaderTest {
@Test
public void testReadMetadados() throws Exception {
PlanilhaReader reader = new PlanilhaReader();
Planilha planilha = new Planilha().setPath("552d4cf1ccf2c0a58301a744/55163343b0df070bbc66e1bb6e0c3f9b.xlsx");
reader.readMetadados(planilha);
}
}
When compiling I get the error:
Hot Swap failed
Tomcat 8.0.18: hierarchy change not implemented;
Tomcat 8.0.18: Operation not supported by VM;
PlanilhaReaderTest: hierarchy change not implemented;
PlanilhaReaderTest: Operation not supported by VM;
PlanilhaReaderTest: hierarchy change not implemented;
PlanilhaReaderTest: Operation not supported by VM