@@ -0,0 +1,885 @@
+package com.twotoasters.servos.util;%0A%0Aimport android.content.res.Resources;%0A%0Aimport com.twotoasters.servos.ServosRobolectricTestRunner;%0A%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0A%0Aimport static org.assertj.core.api.Assertions.assertThat;%0A%0A@RunWith(ServosRobolectricTestRunner.class)%0Apublic class DensityUtilsTest %7B%0A%0A    private final int DP_CONSTANT = 160; //dp is based on density of a 160 dpi screen%0A%0A    @Test%0A    public void itShouldCorrectlyCalculateDpFromPixels() %7B%0A        int dpi = Resources.getSystem().getDisplayMetrics().densityDpi;%0A        assertThat(DensityUtils.getDpFromPixels(1)).isEqualTo(1 / (dpi / DP_CONSTANT));%0A    %7D%0A%0A    @Test%0A    public void itShouldCorrectlyCalculatePixelsFromDp() %7B%0A        int dpi = Resources.getSystem().getDisplayMetrics().densityDpi;%0A        assertThat(DensityUtils.getPixelsFromDp(1)).isEqualTo(dpi / DP_CONSTANT);%0A    %7D%0A%0A%7D%0A

Add tests