In this presentation, we introduce a method for generating test matrices whose true eigenvalues and eigenvectors are known in advance. Such test problems are useful in checking the accuracy of the computed results. Due to a problem of rounding errors, generating a test problem is not trivial work. The point of the method is to apply an error-free transformation of the matrix product. As a result, we can compute matrix multiplications without a rounding error in Jordan normal form, and it is possible to set algebraic and geometric multiplicity and clustered eigenvalues. Finally, we will show numerical examples that illustrate the usefulness of the proposed method.