### Question:
SkyLaunch extends Superpower { @Override protected void activate() { move(0, 0, 20); playSound("SKYLAUNCH_SOUND", 1); spawnParticles("SKYLAUNCH_PARTICLE", 100); } SkyLaunch();   }### Answer:
@Test public void testActivate() throws Exception { var skyLaunch = new SkyLaunch(); var logs = tapSystemOutNormalized(skyLaunch::activate) .split("\n"); final var expectedSize = 3; final var log1 = getLogContent(logs[0]); final var expectedLog1 = "Move to ( 0.0, 0.0, 20.0 )"; final var log2 = getLogContent(logs[1]); final var expectedLog2 = "Play SKYLAUNCH_SOUND with volumn 1"; final var log3 = getLogContent(logs[2]); final var expectedLog3 = "Spawn 100 particle with type SKYLAUNCH_PARTICLE"; Assert.assertEquals(logs.length, expectedSize); Assert.assertEquals(log1, expectedLog1); Assert.assertEquals(log2, expectedLog2); Assert.assertEquals(log3, expectedLog3); }