@Test
public void testAdvance() throws Exception {

    Map<String, Object> contextMap = Maps.newHashMap();
    ProgressControl control = new ProgressControl(UPLOAD_ID, 400);
    control.setContextMap(contextMap);
    assertNull(contextMap.get(ATTRIBUTE_NAME));
    control.advance(1);
    assertNull(contextMap.get(ATTRIBUTE_NAME));
    control.advance(3);
    assertEquals((byte) 1, contextMap.get(ATTRIBUTE_NAME));
    control.advance(196);
    assertEquals((byte) 50, contextMap.get(ATTRIBUTE_NAME));
    control.advance(200);
    assertEquals((byte) 100, contextMap.get(ATTRIBUTE_NAME));
}