class AndroidMocks {

    public static EditText mockEditText(Editable editable) {
        EditText field = mock(EditText.class);
        when(field.getText()).thenReturn(editable);
        return field;
    }

}