How does group cohomology behaves where coefficient is direct sum? Let $G$ be a finite group and $A_1$ and $A_2$ be $\mathbb ZG$ modules. Is it always true that for any $n\in \mathbb N$, the cohomology group of $G$ with coefficients in $A_1\oplus A_2$ is the same as the following:
$$H^n(G; A_1\oplus A_2)=H^n(G; A_1)\oplus H^n(G; A_2) ?$$
If not, then how to calculate $H^n(G; A_1\oplus A_2)$ in terms of $H^n(G; A_1)$ and $H^n(G; A_2)$?
Thanks in advance.
 A: The answer to your question is yes. Remind how cohomology is defined: Pick a projective $G$-resolution $P_* \rightarrow \mathbb{Z}$ for the trivial $G$-module $\mathbb{Z}$ and apply $\text{Hom}_\mathbb{Z}(\cdot,A_1 \oplus A_2) = \text{Hom}_\mathbb{Z}(\cdot,A_1) \oplus \text{Hom}_\mathbb{Z}(\cdot,A_2). $ Taking $G$-invariants respects taking direct products, i.e. we have a cochain complex 
$$\text{Hom}_G(P_*,A_1 \oplus A_2) = \text{Hom}_\mathbb{Z}(P_*,A_1 \oplus A_2)^G = \text{Hom}_\mathbb{Z}(P_*,A_1)^G \oplus \text{Hom}_\mathbb{Z}(P_*,A_2)^G \\ 
= \text{Hom}_G(P_*,A_1) \oplus \text{Hom}_G(P_*,A_2).$$ 
Now $H_*(G; A_1 \oplus A_2)$ is defined to be the cohomology of this complex but since cohomology commutes with finite direct sums of cochain complexes we are done.
Alternatively, you can directly apply $\text{Hom}_G(\cdot, A_1 \oplus A_2) = \text{Hom}_G(\cdot,A_1) \oplus \text{Hom}_G(\cdot,A_2)$ to the complex $P_*$ and then taking cohomology.
Notice that the argument only works for finite direct sums since otherwise in general $\text{Hom}(\cdot, \bigoplus\limits_{i \in I} A_i) \neq \bigoplus\limits_{i \in I} \text{Hom}(\cdot, A_i)$ and also $\text{Hom}(\cdot, \bigoplus\limits_{i \in I} A_i) \neq \prod\limits_{i \in I} \text{Hom}(\cdot, A_i)$. If $G$ is finite one can construct a $G$-resolution of finitely generated free $G$-modules for $\mathbb{Z}$ hence one gets $H^*\left(G;\bigoplus\limits_{i \in I} A_i \right) = \prod\limits_{i \in I} H^*(G;A_i)$ with a little help from Hom and direct sums and since in general cohomology takes arbitrary direct sums to direct products.
