Are eigenspaces and minimal polynomials sufficient for similarity? This question comes out of the conversation in the comments of this answer.  The answerer asserts the following:
$\DeclareMathOperator{\rank}{rank}$

Suppose that $A$ and $B$ have the same minimal polynomial and that for all $\lambda \in \Bbb C$, $\rank(A - \lambda I) = \rank(B - \lambda I)$.  Then $A$ and $B$ are similar.

My question: is this true or false?  I think it's false, and will attempt to build a counterexample as an answer.  However, I welcome any attempts in either direction.

$\DeclareMathOperator{\rank}{rank}$The answer is no.  Notably, the minimal polynomial determines the size of the largest blocks in the Jordan form, $\rank(A - \lambda I)$ determines the total number of blocks.
Let $J_k$ denote the $\lambda = 0$ block of size $k$.  Consider the matrices 
$$
A = J_3 \oplus J_2 \oplus J_2\\
B = J_3 \oplus J_3 \oplus J_1
$$
$A$ and $B$ have the same characteristic polynomial and minimal polynomial. They each have only the eigenvalue $\lambda = 0$, and satisfy $\rank(A) = \rank(B)$.  However, they are not similar.
