public static String getViewId(View view) {
        String idString = null;
        try {
            idString = (String) view.getTag(R.id.sensors_analytics_tag_view_id);
            if (TextUtils.isEmpty(idString)) {
                if (isValid(view.getId())) {
                    idString = SnapCache.getInstance().getViewId(view);
                    if (idString == null) {
                        idString = view.getContext().getResources().getResourceEntryName(view.getId());
                        SnapCache.getInstance().setViewId(view, idString);
                    }
                }
            }
        } catch (Exception e) {
            if (SALog.isLogEnabled()) {
                exceptionCollect(view);
            }
        }
        return idString;
    }
@Test
    public void getViewId() {
        TextView textView1 = new TextView(mApplication);
        textView1.setText("child1");
        textView1.setId(123213);
        Assert.assertNull(SAViewUtils.getViewId(textView1));
    }