Buggy code:
public class PartialUpdateTest extends AbstractRestIT { private static final Logger log = LoggerFactory . getLogger ( PartialUpdateTest . class ) ; double latitude = 37.772837 ; double longitude = - 122.409895 ; Map < String , Double > geolocation = new HashMapBuilder < String , Double > ( ) . map ( "latitude" , latitude ) . map ( "longitude" , longitude ) ; @ Test public void testPartialUpdate ( ) throws IOException { Entity props = new Entity ( ) ; props . put ( "username" , "bart" ) ; props . put ( "employer" , "Brawndo" ) ; props . put ( "email" , "bart@personal-email.example.com" ) ; props . put ( "location" , geolocation ) ; Entity userNode = this . app ( ) . collection ( "users" ) . post ( props ) ; assertNotNull ( userNode ) ; String uuid = userNode . get ( "uuid" ) . toString ( ) ; assertNotNull ( uuid ) ; refreshIndex ( ) ; Map < String , Object > updateProperties = new LinkedHashMap < String , Object > ( ) ; for ( int i = 1 ; i < 10 ; i ++ ) { Entity updateProps = new Entity ( ) ; geolocation . put ( "latitude" , ( latitude += 1.0E-5 ) ) ; geolocation . put ( "longitude" , ( longitude += 1.0E-5 ) ) ; updateProps . put ( "employer" , "Initech" ) ; updateProps . put ( "location" , geolocation ) ; try { userNode = this . app ( ) . collection ( "users" ) . entity ( userNode ) . put ( updateProps ) ; } catch ( UniformInterfaceException uie ) { fail ( ( "Update<seq2seq4repair_space>failed<seq2seq4repair_space>due<seq2seq4repair_space>to:<seq2seq4repair_space>" + ( uie . getResponse ( ) . getEntity ( String . class ) ) ) ) ; } refreshIndex ( ) ; userNode = this . app ( ) . collection ( "users" ) . entity ( userNode ) . get ( ) ; PartialUpdateTest . log . info ( userNode . toString ( ) ) ; assertNotNull ( userNode ) ; assertEquals ( "Initech" , userNode . get ( "employer" ) . toString ( ) ) ; assertNotNull ( userNode . get ( "location" ) ) ; assertNotNull ( ( ( Map < String , Object > ) ( userNode . get ( "location" ) ) ) . get ( "latitude" ) ) ; assertNotNull ( ( ( Map < String , Object > ) ( userNode . get ( "location" ) ) ) . get ( "longitude" ) ) ; PartialUpdateTest . log . info ( ( ( ( geolocation . get ( "latitude" ) ) + "<seq2seq4repair_space>!=<seq2seq4repair_space>" ) + ( Double . parseDouble ( ( ( Map < String , Object > ) ( userNode . get ( "location" ) ) ) . get ( "latitude" ) . toString ( ) ) ) ) ) ; PartialUpdateTest . log . info ( ( ( ( geolocation . get ( "longitude" ) ) + "<seq2seq4repair_space>!=<seq2seq4repair_space>" ) + ( Double . parseDouble ( ( ( Map < String , Object > ) ( userNode . get ( "location" ) ) ) . get ( "longitude" ) . toString ( ) ) ) ) ) ; assertNotSame ( geolocation . get ( "latitude" ) , Double . parseDouble ( ( ( Map < String , Object > ) ( userNode . get ( "location" ) ) ) . get ( "latitude" ) . toString ( ) ) ) ; assertEquals ( geolocation . get ( "latitude" ) . doubleValue ( ) , Double . parseDouble ( ( ( Map < String , Object > ) ( userNode . get ( "location" ) ) ) . get ( "latitude" ) . toString ( ) ) , 0 ) ; assertNotSame ( geolocation . get ( "longitude" ) , Double . parseDouble ( ( ( Map < String , Object > ) ( userNode . get ( "location" ) ) ) . get ( "longitude" ) . toString ( ) ) ) ; assertEquals ( geolocation . get ( "longitude" ) . doubleValue ( ) , Double . parseDouble ( ( ( Map < String , Object > ) ( userNode . get ( "location" ) ) ) . get ( "longitude" ) . toString ( ) ) , 0 ) ; } Entity updateProps = new Entity ( ) ; updateProps . put ( "employer" , "ACME<seq2seq4repair_space>Corporation" ) ; try { <START_BUG> userNode = this . app ( ) . collection ( "users" ) . entity ( props . getString ( "username" ) ) . put ( updateProps ) ; <END_BUG> } catch ( UniformInterfaceException uie ) { fail ( ( "Update<seq2seq4repair_space>failed<seq2seq4repair_space>due<seq2seq4repair_space>to:<seq2seq4repair_space>" + ( uie . getResponse ( ) . getEntity ( String . class ) ) ) ) ; } refreshIndex ( ) ; userNode = this . app ( ) . collection ( "users" ) . entity ( userNode ) . get ( ) ; assertNotNull ( userNode ) ; assertEquals ( updateProps . get ( "employer" ) , userNode . get ( "employer" ) . toString ( ) ) ; assertEquals ( props . get ( "username" ) . toString ( ) , userNode . get ( "username" ) . toString ( ) ) ; } }

Fix:
userNode = this . app ( ) . collection ( "users" ) . entity ( props . get ( "username" ) . toString ( ) ) . put ( updateProps ) ;