### Question:
ApiarySnsListener extends MetaStoreEventListener { @Override public void onDropTable(DropTableEvent event) throws MetaException { if (event.getStatus() == false) { return; } publishEvent(EventType.DROP_TABLE, event.getTable(), null, null, null); } ApiarySnsListener(Configuration config);   ApiarySnsListener(Configuration config, AmazonSNS snsClient); @Override void onCreateTable(CreateTableEvent event); @Override void onDropTable(DropTableEvent event); @Override void onAlterTable(AlterTableEvent event); @Override void onAddPartition(AddPartitionEvent event); @Override void onDropPartition(DropPartitionEvent event); @Override void onInsert(InsertEvent event); @Override void onAlterPartition(AlterPartitionEvent event);  }### Answer:
@Test public void onDropTable() throws MetaException { DropTableEvent event = mock(DropTableEvent.class); when(event.getStatus()).thenReturn(true); when(event.getTable()).thenReturn(table); snsListener.onDropTable(event); verify(snsClient).publish(requestCaptor.capture()); PublishRequest publishRequest = requestCaptor.getValue(); assertThat(publishRequest.getMessage(), is("{\"protocolVersion\":\"" + PROTOCOL_VERSION + "\",\"eventType\":\"" + EventType.DROP_TABLE.toString() + "\",\"dbName\":\"some_db\",\"tableName\":\"some_table\",\"tableLocation\":\"s3: verifyMessageAttributes(publishRequest, EventType.DROP_TABLE.toString(), "some_db", "some_table"); }