Inline initialization of maps in Java has been a sign of weakness in the Java language. This approach has given me the most concise way to initialize maps, while meeting all of my goals. Goals: ...
At my current client, we had a situation where we needed to write JUnit tests for REST services which used a complex object hierarchy. Creating these objects manually proved to be very tedious, so having ...
How many times do you find yourself creating this code over and over again in tests or even production code? List<String> stringList = new ArrayList<String>(); stringList.add("some test string"); stringList.add("some other test string"); aMethodThatTakesAListOfStrings(stringList); Rather than ...