### Question:
PrettyHybridProperty implements HybridProperty<ModelT> { @Override public ModelT get() { return myValue; } PrettyHybridProperty(
      ObservableList<SourceT> source,
      final IndexedTransform<SourceT, Token> read,
      IndexedTransform<Token, SourceT> write,
      Handler<Integer> removeHandler,
      Parser<? extends ModelT> parser,
      PrettyPrinter<? super ModelT> printer,
      ParsingContextFactory parsingContextFactory); @Override ModelT get(); @Override ObservableList<Token> getTokens(); @Override String getPropExpr(); @Override Registration addHandler(EventHandler<? super PropertyChangeEvent<ModelT>> handler);  }### Answer:
@Test public void start() { init(new IdentifierToken("a"), Tokens.PLUS, new IdentifierToken("b")); assertTrue(prop.get() instanceof PlusExpr); assertSync(); }
@Test public void sourceError() { init(); setSource(Tokens.PLUS); assertNull(prop.get()); assertSync(); }
@Test public void tokensError() { init(); setTokens(Tokens.PLUS); assertNull(prop.get()); assertSync(); }
@Test public void tokenError() { init(); setSource(new ErrorToken("something wrong")); assertNull(prop.get()); assertSync(); setTokens(new ErrorToken("something other wrong")); assertNull(prop.get()); assertSync(); }
@Test public void validateSource() { init(); setSource(new IdentifierToken("a"), Tokens.PLUS); assertNull(prop.get()); assertSync(); addSource(new IdentifierToken("b")); assertTrue(prop.get() instanceof PlusExpr); assertSync(); }
@Test public void invalidateSource() { init(); setSource(new IdentifierToken("a"), Tokens.PLUS, new IdentifierToken("b")); assertTrue(prop.get() instanceof PlusExpr); assertSync(); source.remove(2); assertNull(prop.get()); assertSync(); assertEquals(Arrays.asList(2), removeHandler.invocations); }
@Test public void validateTokens() { init(); setTokens(new IdentifierToken("a"), Tokens.PLUS); assertNull(prop.get()); assertSync(); addTokens(new IdentifierToken("b")); assertTrue(prop.get() instanceof PlusExpr); assertSync(); }