@Test public void updateConnectionAccessFields() { insertFacebookConnection(); Connection<TestFacebookApi> facebook = connectionRepository.getPrimaryConnection(TestFacebookApi.class); assertEquals("234567890", facebook.getApi().getAccessToken()); facebook.refresh(); connectionRepository.updateConnection(facebook); Connection<TestFacebookApi> facebook2 = connectionRepository.getPrimaryConnection(TestFacebookApi.class); assertEquals("765432109", facebook2.getApi().getAccessToken()); ConnectionData data = facebook.createData(); assertEquals("654321098", data.getRefreshToken()); }