### Question:
DeadRemovalStrategy implements OptimizationStrategy { List<Integer> getDeadResultAddresses() { return addresses.stream().filter(this::isDeadResult).collect(Collectors.toList()); } DeadRemovalStrategy(ExecutionGraphManipulator manipulator); @Override Map<String, Integer> getOptimizationCounts(); @Override boolean perform(); void setRemoveWeak(boolean removeWeak);  }### Answer:
@Test public void detectsUnusedResultOfMethodInvocationWithNoSideEffects() { String methodName = "unusedResultNoSideEffects()I"; ExecutionGraphManipulator manipulator = OptimizerTester.getGraphManipulator(CLASS_NAME, methodName); DeadRemovalStrategy strategy = new DeadRemovalStrategy(manipulator); List<Integer> found = strategy.getDeadResultAddresses(); List<Integer> expected = Collections.singletonList(1); assertEquals(expected, found); }