dynamic-animation/src/androidTest/java/androidx/dynamicanimation/tests/SpringTests.java
@Test
    public void testGetFinalPosition() {
        SpringAnimation animation = new SpringAnimation(mView1, DynamicAnimation.TRANSLATION_X, 20);
        assertEquals(20, animation.getSpring().getFinalPosition(), 0);

        SpringForce spring = new SpringForce();
        spring.setFinalPosition(25.0f);
        assertEquals(25.0f, spring.getFinalPosition(), 0.0f);
    }
/**
     * Check the final position of the default spring against what's being set through the
     * constructor.
     */
Check the final position of the default spring against what's being set through the
constructor.
Check the final position of the default spring against what ' s being set through the constructor .
@Test
    public void testGetFinalPosition() {
        SpringAnimation animation = new SpringAnimation(mView1, DynamicAnimation.TRANSLATION_X, 20);
        assertEquals(20, animation.getSpring().getFinalPosition(), 0);
        SpringForce spring = new SpringForce();
        spring.setFinalPosition(25.0f);
        assertEquals(25.0f, spring.getFinalPosition(), 0.0f);
    }
@ Test public void testGetFinalPosition ( ) { SpringAnimation animation = new SpringAnimation ( mView1 , DynamicAnimation . TRANSLATION_X , 20 ) ; assertEquals ( 20 , animation . getSpring ( ) . getFinalPosition ( ) , 0 ) ; SpringForce spring = new SpringForce ( ) ; spring . setFinalPosition ( 25.0f ) ; assertEquals ( 25.0f , spring . getFinalPosition ( ) , 0.0f ) ; }
Check the final position of the default spring against what's being set through the
 constructor.
Check the final position of the default spring against what ' s being set through the constructor .