Energy density in electrostatics

Imagine two hollow spheres with radius $R$ with charges $q$ and $-q$. $L>2R$ is distance between them. Potential energy of the each sphere is \begin{equation*} W_1=\frac 1{8\pi \epsilon_0}\frac {q^2} R \end{equation*}

\begin{equation*} W_2=\frac 1{8\pi \epsilon_0}\frac {q^2} R \end{equation*} Potential energy between the spheres is \begin{equation*} W_{12}=-\frac 1{4\pi \epsilon_0}\frac {q^2} L \end{equation*} Am I right that calculating the total energy as \begin{equation*} W=\frac{\epsilon_0}2\int \vec{E}^2 dxdydz \end{equation*} I'll get $W_1+W_2+W_{12}$?

Are there any examples, where $\int \vec{E}^2 dxdydz$ gives wrong result (except self energy of a point charge)?