DefaultUrl implements Url { @Override public void screenHeightDp(int screenHeightDp) { parameters.put(QUERY_PARAMETER_SCREEN_HEIGHT_DP, String.valueOf(screenHeightDp)); } DefaultUrl(@NonNull String baseUrl); @Override void fontScale(float fontScale); @Override void hardKeyboardHidden(int hardKeyboardHidden); @Override void keyboard(int keyboard); @Override void keyboardHidden(int keyboardHidden); @Override void locale(Locale locale); @Override void mcc(int mcc); @Override void mnc(int mnc); @Override void navigation(int navigation); @Override void navigationHidden(int navigationHidden); @Override void orientation(int orientation); @Override void screenLayout(int screenLayout); @Override void touchscreen(int touchscreen); @Override void uiMode(int uiMode); @Override void densityDpi(int densityDpi); @Override void screenWidthDp(int screenWidthDp); @Override void screenHeightDp(int screenHeightDp); @Override void smallestScreenWidthDp(int smallestScreenWidthDp); @Override String build();  }
@Test public void testScreenHeightDp() throws Exception { url = new DefaultUrl(BASE_URL); url.screenHeightDp(7); assertTrue("screen_height_dp key exists", url.parameters.containsKey(DefaultUrl.QUERY_PARAMETER_SCREEN_HEIGHT_DP)); assertTrue("screen_height_dp value exists", url.parameters.containsValue("7")); }