Testing Java Monitors By State Space Exploration