@ -201,7 +201,8 @@ public class RadioPlayer implements Device {
@Override
public String unmute() {
return null;
setLautstaerke(savedVolume);
return ("RadioPlayer is unmuted Volume is set to " + getVolume());
}
@ -365,4 +365,12 @@ class RadioPlayerTest {
Arguments.of("Test for mute RadioPlayer if volume is saved before muting", "saved", rp1, 30)
);
@Test
void TestUnmute() {
RadioPlayer rp = new RadioPlayer();
rp.setLautstaerke(40);
rp.mute();
rp.unmute();
assertThat(rp.getVolume()).describedAs("Test if unmute is setting the saved volume").isEqualTo(rp.savedVolume);