ActionProfileSwitch extends Action { @Override public String shortDescription() { String returned = MainApp.gs(R.string.changengetoprofilename, inputProfileName.getValue()); return returned; } ActionProfileSwitch(); @Override int friendlyName(); @Override String shortDescription(); @Override void doAction(Callback callback); @Override void generateDialog(LinearLayout root); @Override boolean hasDialog(); @Override String toJSON(); @Override Action fromJSON(String data); @Override Optional<Integer> icon();  }
@Test public void shortDescriptionTest() { actionProfileSwitch = new ActionProfileSwitch(); actionProfileSwitch.inputProfileName.setValue("Test"); when(MainApp.gs(anyInt(), anyString())).thenReturn("Change profile to Test"); Assert.assertEquals("Change profile to Test", actionProfileSwitch.shortDescription()); }