It is known that the center of nilpotent Lie algebra is never trivial as it always contain $C^n(\mathfrak{g})$ if $\mathfrak{g}$ is nilpotent of class $n+1$
Let $C^n$ denote descending central series. I am looking for an example of direct sum of 2 nilpotent algebras $\mathfrak{g}=\mathfrak{g_1}\oplus\mathfrak{g_2}$ such that $\mathfrak{g}$ is nilpotent of class $n+1$ and $C^n(\mathfrak{g}) \subsetneq \mathfrak{z}(\mathfrak{g})$.
What I did:
I thought about the simplest nilpotent algebra I know: the strictly upper triangular matrices with entries in $\Bbb R$: $\mathfrak{g}=\mathfrak{b_n}\oplus \mathfrak{b_n}$ (notation $\mathfrak{b_n}$ here to denote strictly upper triangular matrices is an abuse).
I found for $n=2$ that $\mathfrak{z}(\mathfrak{b_2}) = \mathfrak{b_2}$ but I have a feeling it is true for every $n>2$. If this is the case, $\mathfrak{z}(\mathfrak{g})=\mathfrak{z}(\mathfrak{b_n})\oplus \mathfrak{z}(\mathfrak{b_n})=\mathfrak{b_n}\oplus \mathfrak{b_n}$ and $C^n(\mathfrak{g}) \neq \mathfrak{g}$ so $C^n(\mathfrak{g}) \subsetneq \mathfrak{z}(\mathfrak{g})$.
Is that correct? Are there other interesting examples?
Thank you for your help.
Here is an example of an indecomposable nilpotent Lie algebra $L$ of dimension $7$ with $C^5(L)=0$ but $C^4(L)\subsetneq Z(L)$. Here $C^1(L)=L$ and $[L,C^k(L)]=C^{k+1}(L)$. Consider the Lie brackets with respect to a basis $(x_1,\ldots ,x_7)$ given by $$ [x_1,x_2]=x_4,\; [x_1,x_4]=x_5,\;[x_1,x_5]=x_7,\; [x_2,x_3]=x_7,\; [x_2,x_4]=x_6. $$ Then $Z(L)=\langle x_6,x_7\rangle$, but $C^4(L)=\langle x_7\rangle$ and $C^5(L)=0$.
Now take the direct sum $L\oplus L$.