Author Archives: Piotr Jagielski

Switching Between Frequently Used Programs in Windows 7

Using Windows 7 taskbar shortcuts makes it easier to start and switch between most commonly used applications. Continue reading

Posted in General | Tagged , | Leave a comment

Reflection-Based Object Comparison in Tests

Using reflection is a convenient way to compare objects in unit tests. The Unitils library provides reflection-based assertions. Continue reading

Posted in Java | Tagged , , , , | Leave a comment

Comparison Dialog in JUnit for Objects Other Than Strings

This article describes how to to compare objects in JUnit in case of test failure using the dialog known from comparing strings. Continue reading

Posted in Java | Tagged , , , | 2 Comments

Google Guava vs Apache Commons for Argument Validation

Google Guava and Apache Commons both offer utility classes for argument validation. This article describes the differences between them. Continue reading

Posted in Java | Tagged , , , , | 30 Comments

Working With Static Imports in Eclipse

Eclipse has few that make working with static imports easier including keyboard shortcut for adding static import and favorite static members for code completion. Continue reading

Posted in Java | Tagged , , , | 2 Comments

Intuitive Behavior Verification With Mockito

Mockito makes behavior verification similar to expressing standard assertions. It is much more intuitive than popular frameworks that use expect-run-verify pattern. Continue reading

Posted in Java | Tagged , , , | 8 Comments

Local Maven Site in Multi-Module Project

There are few ways to create a Maven site in multi-module project without deploying it remotely. Continue reading

Posted in Java | Tagged , , , | 2 Comments

Custom Assertions in FEST Assert

Using FEST Assert library helps to reduce duplication in unit tests and make assertions look almost like a natural language. Continue reading

Posted in Java | Tagged , , | 3 Comments

Less Verbose Java Collection Creation With Google Guava

Static factory methods from Google Guava library make the creation of generic collections in Java less verbose. Continue reading

Posted in Java | Tagged , , | Leave a comment

Maintainable HashCode and Equals Using Apache Commons

Using reflection based equals and hashCode from Apache Commons is a more maintainable alternative to code generation in the IDE. Continue reading

Posted in Java | Tagged , , , , | Leave a comment