### Question:
LiteralAdapter implements LiteralVisitor { @Override public void visitLanguageLiteral(LanguageLiteral literal) { adaptValue(literal.get()); } private  LiteralAdapter(Class<? extends T> aClazz); @Override void visitLiteral(Literal<?> literal); @Override void visitTypedLiteral(TypedLiteral<?> literal); @Override void visitLanguageLiteral(LanguageLiteral literal);  }### Answer:
@Test public void testVisitLanguageLiteral$valid() throws Exception { LiteralAdapter<String> nAdapter = LiteralAdapter.newInstance(String.class); nAdapter.visitLanguageLiteral(Literals.newLanguageLiteral("1","en")); assertThat(nAdapter.adaptedValue(),equalTo("1")); }
@Test public void testVisitLanguageLiteral$notValid() throws Exception { LiteralAdapter<Number> nAdapter = LiteralAdapter.newInstance(Number.class); nAdapter.visitLiteral(Literals.newLanguageLiteral("1","en")); assertThat(nAdapter.adaptedValue(),equalTo(null)); }