title: How to prove that HashMap in java is not thread-safe
body: <p>I'm working on an application, that has uses a <code>HashMap</code> to share state. I need to prove via unit tests that it will have problems in a multi-threaded environment.</p>
  <p>I tried to check the state of the application in a single thread environment and in a multi-threaded environment via checking the size and elements of the <code>HashMap</code> in both of them. But seems this doesn't help, the state is always the same.</p>
  <p>Are there any other ways to prove it or prove that an application that performs operations on the map works well with concurrent requests?</p>