### Question:
ReadingContextTranslator implements Translator<ReadingContext> { public ReadingContext translate() { if (this.readingContext == null || this.readingContext.isEmpty()) { return ReadingContext.PERIODIC_SAMPLE; } ReadingContext result; switch (this.readingContext) { case "Interruption.Begin": result = ReadingContext.BEGIN_INTERRUPTION; break; case "Interruption.End": result = ReadingContext.END_INTERRUPTION; break; case "Sample.Clock": result = ReadingContext.CLOCK_SAMPLE; break; case "Sample.Periodic": result = ReadingContext.PERIODIC_SAMPLE; break; case "Transaction.Begin": result = ReadingContext.BEGIN_TRANSACTION; break; case "Transaction.End": result = ReadingContext.END_TRANSACTION; break; default: throw new AssertionError(String.format("Unknown value for ReadingContext: '%s'", this.readingContext)); } return result; } ReadingContextTranslator(@Nullable String readingContext); ReadingContext translate();  }### Answer:
@Test(expected = AssertionError.class) public void testTranslate() throws Exception { new ReadingContextTranslator("Not.A.Reading.Context").translate(); }