For a class as challenging as the domain model DynamicArray it is suggested to write test code as you code the model (in parallel). Put your test code in another package (not the same package as the domain model class). This will help flush out more bugs.
As far as test data, it is okay for some of the tests to use primitive-like objects (integers, strings, ...) but you want to also write tests that use richer objects.
These "richer" object (types) are coder's choice (e.g. possible types are Employee, Person, Animal, Restaurant, etc)
The object type (i.e., the "class") should include equality methods.
Here is an example of a simple class with common methods such as equality methods, accessors (getters and setters), etc.