### Question:
ExpressionLanguage { static <T> WriteExpression<T> readOnlyWriteExpression(String errorMessage) { return new ReadOnlyWriteExpression<>(errorMessage, ""); } private  ExpressionLanguage(); static String channelFromFormula(String formula); static DesiredRateReadWriteExpression<?, Object> formula(String formula); static DesiredRateReadWriteExpression<?, Object> formula(FormulaAst ast); static DesiredRateExpression<?> formulaArg(String formula); static DesiredRateExpression<T> formula(String formula, Class<T> readType);  }### Answer:
@Test public void readOnlyWriteExpression1() throws InterruptedException { DataSource sim = new MockDataSource(); CountDownPVWriterListener<Object> listener = new CountDownPVWriterListener<Object>(1); PVWriter<Object> pvWriter = PVManager.write(ExpressionLanguage.readOnlyWriteExpression("Error message")) .from(sim) .writeListener(listener) .async(); try { listener.await(Duration.ofMillis(200)); Exception ex = pvWriter.lastWriteException(); assertThat(ex, instanceOf(RuntimeException.class)); assertThat(ex.getMessage(), equalTo("Error message")); assertThat(pvWriter.isWriteConnected(), equalTo(false)); Thread.sleep(200); assertThat(pvWriter.lastWriteException(), nullValue()); assertThat(pvWriter.isWriteConnected(), equalTo(false)); } finally { pvWriter.close(); sim.close(); } }