If this method is meant to be a test method, don't use such method name as DoublyLinkedListTest, it doesn't say anything useful about your test case.
Test method name should reveal its full intention, that could be even 20 words if needed.
Are you using
JUnit testing framework? I don't see any annotation above the method.
Which
Java version you use?
When you initialize you don't need to supply parameter type on the right hand side (bolded) ArrayList<
String> test2 = new ArrayList<
String>();.
Since Java 7 it is called diamond operator, so you can write just ArrayList<String> test2 = new ArrayList<>();
Please fix code indentation on line 4. That closing curly brace should be aligned with keyword
public. Also, when you indenting your code, use 4 spaces for shifting.
Currently you have 2 spaces only, that could become tricky to read when the class gets bigger.
[edit] I just noticed it is not a method, but rather a class. Same as Junilu, please clarify what are you trying here. Thank you.