Tests java invocation memory increased