It should really look like
private Map<String, String> test = new HashMap<>();
So elements of both are correct.;) Map is the interface, which defines behavior, and HashMap is an implementation that provides the behavior.
If you want stronger type safety, you should use the generic arguments. While they are not strictly necessary, they add a lot of value at reducing application errors. Since generics were introduced in Java 5, examples from before then won't have show the generic arguments.
The "diamond operator" <> was introduced with Java 7 - it means you can reduce the second occurrence of the generic type specifier to just <>.